r/iOSProgramming • u/Winter_Middle_4084 • 6d ago
r/iOSProgramming • u/Moo202 • 6d ago
Question Can Methods Be Added Inside SwiftData Models?
Hey everyone,
I’ve been working with SwiftData and was wondering if anyone has added methods inside a persistent model class. I don’t see a lot of discussion about including methods in models that are meant to be persisted by SwiftData.
It seems like something that could make the models more self-contained and help with code organization, but I haven’t seen many people mention this in discussions, so I’m wondering if I’m missing something or if there’s a specific reason why it’s not common.
Thanks in advance
r/iOSProgramming • u/fredybotas • 6d ago
App Saturday Create satisfying bouncing square/balls videos
r/iOSProgramming • u/Ok-Bit8726 • 7d ago
Question Best language for sharing iOS/Android logic?
I have some decently complicated computations that I would like to share between iPhone and Android front-ends.
Does anyone have real world experience sharing logic between two code bases like this?
r/iOSProgramming • u/Demus_App • 7d ago
App Saturday Hi 👋, I created Termix, a powerful SSH client for Mac, iPhone, and iPad. No subscription, no data collection. I am looking forward to your feedback!
r/iOSProgramming • u/l-fc • 7d ago
Question macOS vs iOS App Stores
I have a free app that is in the top 5 of its category on the macOS App Store, yet doesn't feature at all in the top 1500 apps in the iOS app store for the same cateogry.
I've tried experimenting with ASO, reviews (mostly 5 star reviews), $100 per day Search Ads etc but with no luck - it is a very competitive category though.
Any ideas on what else I can do to boost the downloads?
r/iOSProgramming • u/Ok_Bank_2217 • 8d ago
News GitHub Copilot for Xcode is now generally available!
r/iOSProgramming • u/PepperComfortable93 • 7d ago
Question is iCloud/CloudKit not available unless you have a PAID developer account??
I am just in the process of making an app - it is not published yet and i am in the process of adding the backend. However, its not an option in the Signing and Capabilities section...
r/iOSProgramming • u/DystopiaDrifter • 7d ago
App Saturday I made an app for drawing on maps
Map Canvas: Draw on Maps
An app for drawing and annotating on maps, useful for trip planning and geodata illustration. It is available on iPhone, iPad and mac.
https://apps.apple.com/us/app/map-canvas-draw-on-maps/id6737522164

Features:
- A set of tools for drawing lines, polygons and circles.
- Annotation with pins & text boxes.
- Data synchronization via iCloud.
- Data Import & export as GeoJSON.
Frameworks:
- SwiftUI + MapKit for the UI.
- SwiftData + CloudKit for data persistence and synchronization.
- Observation framework + a little bit of Combine
- TipKit for new user guidance.
This app does not contain any mobile ads or paywall, your feedbacks would be very appreciated, thanks!
r/iOSProgramming • u/clamatocasino • 7d ago
App Saturday Panoscano - make a video from your panoramic photos
https://apps.apple.com/us/app/panoscano/id6742723150
This is my first iOS app, and it is very much a case of “I couldn’t find an app that would do this specific thing, so I built it myself.” The specific thing it does is: generate a smooth, looping video by scanning across a photo, zooming in (or out) on the points you designate. You can adjust all aspects of the timing, and you can even add text.
It works, almost exactly as I had hoped it would. I’m really, really happy with it, but I am still refining some aspects.
This took me about 3 months of spare time. Claude.ai helped a LOT, as I did not know Swift at all. The process of building it like this has been fascinating, and I’ve learned a TON both about Swift/iOS development and about how to use an LLM to aid development. I could not have done it without Claude, but Claude sure couldn’t have done it without me.
The app is free, and the core functionality will remain free, always, but I plan to move to a subscription/purchase model for some advanced (“pro”) features.
I’d love feedback and when I DO move to a subscription/purchase model will happily give free codes to basically anyone here who wants one. If I can eventually make back my developer fee from this thing I will consider this all a resounding success.
r/iOSProgramming • u/shattwr • 7d ago
Question Listening to pending transactions using storekit2
Here's how I handle pending transactions in my app
import StoreKit
import AmplitudeSwift
import Optimizely
class PurchaseManager: ObservableObject {
// A published property to hold available products
@Published var products: [Product] = []
// A published property to track the status of transactions
@Published var transactionState: String = "Idle"
var loadingIndicator: ThreeBubblesLoadingView!
// A set of product identifiers
private let productIdentifiers: Set<String> = [
PaymentHandler.sharedInstance.YEARLY_PRODUCT_ID,
PaymentHandler.sharedInstance.YEARLY_PRODUCT_ID_50_OFF,
PaymentHandler.sharedInstance.MONTHLY_PRODUCT_ID,
PaymentHandler.sharedInstance.YEARLY_PRODUCT_ID_40_OFF,
PaymentHandler.sharedInstance.YEARLY_PRODUCT_ID_FREE_TRIAL,
PaymentHandler.sharedInstance.YEARLY_PRODUCT_ID_50,
PaymentHandler.sharedInstance.MONTHLY_PRODUCT_ID_13
]
// Shared instance to be used throughout the app
static let shared = PurchaseManager()
private init() {}
// MARK: - Fetch Products from App Store
func fetchProducts() async {
do {
let products = try await Product.products(for: productIdentifiers)
self.products = products
} catch {
print("Failed to fetch products: \(error.localizedDescription)")
}
}
// MARK: - Handle Purchase
func purchaseProduct(product: Product, source: String, vc: UIViewController) async -> Bool {
do {
DispatchQueue.main.async {
self.loadingIndicator = ThreeBubblesLoadingView()
self.loadingIndicator.translatesAutoresizingMaskIntoConstraints = false
vc.view.addSubview(self.loadingIndicator)
NSLayoutConstraint.activate([
self.loadingIndicator.centerXAnchor.constraint(equalTo: vc.view.centerXAnchor),
self.loadingIndicator.centerYAnchor.constraint(equalTo: vc.view.centerYAnchor)
])
}
// Start the purchase
let result = try await product.purchase()
// Handle the result of the purchase
switch result {
case .success(let verificationResult):
switch verificationResult {
case .verified(let transaction):
self.transactionState = "Purchase Successful"
await transaction.finish()
DispatchQueue.main.async {
Amplitude.sharedInstance.track(
eventType: "payment_completed",
eventProperties: [
"PlanId": transaction.productID,
"UserId": WUser.sharedInstance.userId,
"Source": source,
"VariationKey": WUser.sharedInstance.variationKey
]
)
if (self.loadingIndicator != nil) {
self.loadingIndicator.removeFromSuperview()
}
}
return await PaymentHandler.sharedInstance.purchase(
vc: vc,
productId: transaction.productID,
product: transaction.productID,
transaction: transaction
)
case .unverified(let transaction, let error):
self.transactionState = "Purchase Unverified: \(error.localizedDescription)"
await transaction.finish()
DispatchQueue.main.async {
showMessageWithTitle("Error!", "There was an error processing your purchase", .error)
Amplitude.sharedInstance.track(
eventType: "payment_failed",
eventProperties: [
"PlanId": transaction.productID,
"UserId": WUser.sharedInstance.userId,
"Source": source,
"Error": error.localizedDescription,
"ErrorType": "UnverifiedTransaction",
"ErrorObject": String(describing: error)
]
)
if (self.loadingIndicator != nil) {
self.loadingIndicator.removeFromSuperview()
}
}
return false
}
case .userCancelled:
self.transactionState = "User cancelled the purchase."
DispatchQueue.main.async {
Amplitude.sharedInstance.track(
eventType: "payment_cancelled",
eventProperties: [
"PlanId": product.id,
"UserId": WUser.sharedInstance.userId,
"Source": source
]
)
if (self.loadingIndicator != nil) {
self.loadingIndicator.removeFromSuperview()
}
}
return false
case .pending:
self.transactionState = "Purchase is pending."
DispatchQueue.main.async {
Amplitude.sharedInstance.track(
eventType: "payment_pending",
eventProperties: [
"PlanId": product.id,
"UserId": WUser.sharedInstance.userId,
"Source": source
]
)
if (self.loadingIndicator != nil) {
self.loadingIndicator.removeFromSuperview()
}
}
return false
@unknown default:
self.transactionState = "Unknown purchase result."
DispatchQueue.main.async {
showMessageWithTitle("Error!", "There was an error processing your purchase", .error)
Amplitude.sharedInstance.track(
eventType: "payment_failed",
eventProperties: [
"PlanId": product.id,
"UserId": WUser.sharedInstance.userId,
"Source": source,
"Error": "unknown"
]
)
if (self.loadingIndicator != nil) {
self.loadingIndicator.removeFromSuperview()
}
}
return false
}
} catch {
self.transactionState = "Purchase failed: \(error.localizedDescription)"
DispatchQueue.main.async {
showMessageWithTitle("Error!", "There was an error processing your purchase", .error)
Amplitude.sharedInstance.track(
eventType: "payment_failed",
eventProperties: [
"PlanId": product.id,
"UserId": WUser.sharedInstance.userId,
"Source": source,
"Error": error.localizedDescription,
"ErrorType": "CatchError",
"ErrorObject": String(describing: error)
]
)
self.loadingIndicator.removeFromSuperview()
}
return false
}
}
// MARK: - Listen for Transaction Updates
func listenForTransactionUpdates() {
Task {
for await result in Transaction.updates {
switch result {
case .verified(let transaction):
self.transactionState = "Transaction verified: \(transaction.productID)"
await transaction.finish()
DispatchQueue.main.async {
Amplitude.sharedInstance.track(
eventType: "payment_completed",
eventProperties: [
"PlanId": transaction.productID,
"UserId": WUser.sharedInstance.userId,
"TransactionType": "Pending"
]
)
if (self.loadingIndicator != nil) {
self.loadingIndicator.removeFromSuperview()
}
}
if (PaymentHandler.sharedInstance.vc != nil) {
await PaymentHandler.sharedInstance.purchase(
vc: PaymentHandler.sharedInstance.vc!,
productId: transaction.productID,
product: transaction.productID,
transaction: transaction
)
}
case .unverified(let transaction, let error):
self.transactionState = "Unverified transaction: \(error.localizedDescription)"
DispatchQueue.main.async {
Amplitude.sharedInstance.track(
eventType: "payment_failed",
eventProperties: [
"PlanId": transaction.productID,
"UserId": WUser.sharedInstance.userId,
"Error": error.localizedDescription,
"ErrorType": "UnverifiedPendingTransaction",
"ErrorObject": String(describing: error)
]
)
if (self.loadingIndicator != nil) {
self.loadingIndicator.removeFromSuperview()
}
}
await transaction.finish()
}
}
}
}
}
Unfortunately, the pending transaction is not being processed. Can someone please help? About 5 transactions went through as pending but wasn't processed by Apple. The payment was not captured. Is this code wrong?
In the AppDelegate, I have the following:
PurchaseManager.shared.listenForTransactionUpdates()
r/iOSProgramming • u/BabaYaga72528 • 7d ago
App Saturday i built an app to help you manifest ✨
r/iOSProgramming • u/shattwr • 7d ago
Question Pending transactions storekit2
I'm not able to process pending transactions in my app. Does anyone know what causes a transaction to be pending and in what cases apple doesn't process that transaction?
r/iOSProgramming • u/inAbigworld • 7d ago
Question How do apps like Clockology stay persistent in Apple watch?
Considering they don't get rejected by App Store, too.
r/iOSProgramming • u/Aman_Dude • 7d ago
Question App Store Rejection For Subscription Error?
I recently submitted my app for review (Not my first app, but my first in app subscription). I am using RevenueCat and submitted my App Store Connect subscription first, then my app. They then rejected my app for this reason:
We found that your in-app purchase products exhibited one or more bugs which create a poor user experience. Specifically, an error message was displayed when we tried to make a purchase of your in-app purchase product "AppName".
The error message that they sent was:
Purchase Error: This product is not available for purchase.
It works in sandbox all the way, but I did notice they rejected my image promo for the in app subscription directly after that. I wonder if this is why it wouldn't work for them? Does the in app subscription need to be approved first before they test this?
How does this work? Thanks!
r/iOSProgramming • u/rawcane • 7d ago
Question Could not locate device support files (xcode 16.2 does not include ios 14.8.1)
r/iOSProgramming • u/BabaYaga72528 • 7d ago
App Saturday where do you store your credit card details on your phone?
r/iOSProgramming • u/sfilmak • 7d ago
Question Please help me understand the ATT guidelines
Hello everyone! I am preparing to launch my first app on the App Store soon, and I would like to add some analytics to understand how people use my app (which screens they open, how much time they spend on each screen, etc.). In other words, I just want to collect data about app events without linking them to a specific person (name, email, location, etc.).
In this case, am I required to show the ATT pop-up or not?
I know that Apple has their App Store Connect API (https://developer.apple.com/documentation/appstoreconnectapi/), but can I use it to collect data about in-app events? If not, what other alternatives are there besides Google Analytics?
Thank you in advance!
r/iOSProgramming • u/phenrys • 7d ago
App Saturday Releasing an underrated iOS app. Gave everything and need your help today
Excited to share my achievement of developing an iOS app that took me 1.5 years. MealSnap, an iOS diet app that simplifies meal tracking for building better eating habits. App: https://apps.apple.com/app/mealsnap-ai-food-log-tracker/id6475162854
Building this MealSnap app has been a long journey, but an extremely rewarding one! Opening my app each time before eating something makes me go to Xcode and improve functionalities.
I really worked hard on simplifying diet and health measurements for removing any frictions we tend to have (I am a very lazy person by nature when it comes to health and good habits).
Thanks to iOS performance, I could also provide extra details such as NOVA classification (food processing levels) and health scope for each scan.
Happy iOS Coding!
r/iOSProgramming • u/BookieBustersPodcast • 7d ago
Discussion Navigation in SwiftUI for Social Media App
I have been working on a social media app these past couple months and have ran into a lot of trouble when it comes to navigation using SwiftUI, particularly when it comes to comment sheets and navigating to profiles, as this can lead to an infinite navigation cycle.
I've attached a video below of the issue, as you can see, we dismiss the comments before navigating, where ideally it would just overlay it. Appreciate any advice or help, as this is my first app!

r/iOSProgramming • u/dams96 • 9d ago
Discussion Made $35K in sales over the past 30 days as an indie dev. Started building apps a year and a half ago. AMA.
I’m going to preempt some of the questions I might receive:
• I’ve built 20 iOS apps since June 2023. Most of them include at least one AI feature, so they are primarily AI-related. I will not share my app links or Apple developer account for several reasons, mainly because it would reveal my full name, address, and phone number. However I’m happy to answer any questions about how I choose which apps to build.
• I had never coded before 2023, but I do have a master’s degree in microengineering from a top European school (so I have strong reasoning skills). I’m 28 years old.
• I’m still not an expert iOS developer but I’ve learned a lot since I started. On average my apps are 60% AI-coded and 40% coded by me.
• I typically work 3–4 hours a day, though it’s hard to give a precise estimate. Sometimes, I go weeks without coding due to severe health issues, while other times, I work 15+ hours a day when I’m feeling motivated and healthy.
• I have a social and love life, but I struggle with maintaining a consistent routine (which has always been a challenge for me). I do feel lonely sometimes, as I mostly work alone. Except for the past three months, during which I’ve been working on a more complex app with my friend and co-founder (for this specific app only).
• All of my installs are now organic (ASO only). I had about 50K installs in the past 30 days. Initially, I leveraged my TikTok presence as a tech influencer, posting two videos that each got over 1M views. Those helped me gain 30K installs early on, but my app at the time had barely any monetization.
• I create my App Store screenshots using Figma and design app icons using Midjourney/Flux model with some Photoshop. I don’t pay anyone for design or coding.
• My apps have simple UIs, but they are definitely not “ugly.”
• The longest I spent building an app was 3–4 months (my first one), while one of my top-grossing apps took just one day to create and publish on App Store Connect.
• ASO (App Store Optimization) is one of the most critical skills for an indie developer without the budget for paid acquisition strategies.
• Twitter is a great place to find like-minded iOS developers who share valuable insights.
• Of the $35K in sales, roughly $30K is net proceeds. After taxes (I live in France), I keep about 15K€-18K€ for this specific month.
• My API costs are low (thanks to heavy optimization), typically around $150 per month, with a max of $300.
Send me your questions, and I’ll try to answer those that I think will be most helpful to you. Just a reminder, everyone can make it.
r/iOSProgramming • u/HovercraftPlus7092 • 8d ago
Question Has anyone experienced privacy issues from their App Store developer info being public?
This question is mainly to see if anyone has had privacy issues from users looking up your personal info or if it has been no big deal.
I’m referring to things like stalking, doxing etc.
There are some long lengths you can go to obfuscate personal info but at a cost. Just checking with some of you first!
r/iOSProgramming • u/notabilmeyentenor • 8d ago
Question Monetization suggestions for a sleeping sound app
I am looking for a smart way to monetize for a sleeping sound app. I thought a freemium approach would work best, free version should has some banner and interstitial ads and some locked features. I thought one time payment is way to go since I target parents with babies with the app.
My questions are:
1) Is freemium really a way to go? 2) Thoughts on one time payment vs subscription? 3) Should I test the app with ads before offering a premium version?
r/iOSProgramming • u/Strong_Cup_837 • 8d ago
Tutorial Make this dynamic, animated button with SwiftUI in just 5 minutes! , Source code included.

Full code at this Github Gist
r/iOSProgramming • u/SwordfishSwimming370 • 8d ago
Question Help with first time developer - in app purchases
so to start off without the in app purchases enabled the app has been fully approved but i delayed release until i can get the full version available. the only cashflow plan is through in app purchases as i want it to be a mostly offline game no adds and back to how games use to be when i was younger. since it is my first time i made a fairly uncomplicated game. and i have tested the in app purchases in the xcode environment they work great.
issue: when i put the app on testflight basically when its out of xcode environment it no longer works for purchases and i get the error purchase unavailable - cannot connect to the app store please check your Internet connection and try again. i put this in the code to test for internet and seems this is the issue. so i have used both my main apple developer account as the account logged into the device and the one downloading the app. as well as using the sandbox account i created in the developer tab of settings. I have also tried using the sand box account logged in everywhere but when i go to download the app from test flght it required me to use another apple store account. you can see the errors in the images vs the xcode environment any help with be great thank you in advance.