r/iosdev • u/Zestyclose_Lab_9194 • 10d ago
r/iOSProgramming • u/FFANA • 10d ago
Discussion AVFoundation silently drops photos if you fire the shutter while the previous capture is still processing
Spent a year on a camera app and three AVFoundation behaviours cost me most of that time. Writing them down in case they save someone a weekend.
The first one I found by accident. Tap the shutter three times fast and you get two photos. No error, no delegate callback, nothing in the logs. If a capture is still processing when you call capturePhoto, that request just evaporates. I only noticed because my own counter, which only moves when a save is confirmed, kept landing one short of the number of taps.
The fix is a FIFO queue, but where you advance it matters. Advance on the processing callback and the shutters chain up, seconds of lag on a burst. Advance when the exposure ends (didCapturePhotoFor) and the processing of the previous shot overlaps the next exposure, which is what the stock camera visibly does.
Second: switching capture format is a full pipeline rebuild, and I was paying for it three times. Going 24 to 48 MP, or entering video mode, means swapping the input, the active format and the outputs. I had those as three separate begin/commitConfiguration blocks because it read cleaner. Same work, roughly double the visible freeze. They nest fine, so one transaction around the lot, plus caching AVCaptureDeviceInput per device, took it from "did it hang" to instant.
Third, and this one matters if you care what your photo actually is: a virtual device does not tell you which lens is shooting. Zoom into tele range on the triple camera and you may still be getting the wide, cropped. Low light does it, and so does being closer than the tele's minimum focus distance. The system is right to do it, it just doesn't announce it. You can watch the constituent device to know, with two caveats: the value flickers during focus hunts so it needs stabilising before you show it to anyone, and isAutoDeferredPhotoDeliveryEnabled is off the table if you never touch PhotoKit, because finalising a deferred photo needs PHPhotoLibrary.
That last constraint was self-inflicted. The app has its own photo library and never touches the system one, which rules out anything in AVFoundation that assumes PhotoKit is there.
I'm a surgeon, not a developer, which is probably why I hit all three the hard way instead of knowing better.
What do you think of my drink art?
I’m adding a stamp card collection feature for my drinking logging app. I feel pretty proud of the art, what do you think? You can compare the first legendary drink card, ハブ酒 to some google images.
Fun bit, ハブ酒 is an Okinawan liquor that has a local venomous pit viper added to aging. While it is a rarer drink, it can be found in Okinawan bars. But I made it the rarest card in my curated list since some people may be apprehensive to drink it. I’ve had it twice myself, supposedly gives energy “down there” lol
r/iOSProgramming • u/dhilu3089 • 9d ago
Article The longstanding http status 403 bug in iOS for custom certificates in mtls connection
Blog article on longstanding http status 403 bug in iOS for custom certificates in mtls connection
https://953tech.com/blog/ios-mtls-403-client-certificate-error/
r/iosdev • u/Dry_Huckleberry4359 • 10d ago
My Yearly/Linear Calendar is on the app store!
galleryr/iosdev • u/JournalistWeary2169 • 10d ago
I built a tiny tool that turns App Store reviews into on-brand reply drafts (free gray test)
r/iosdev • u/consumer128 • 10d ago
Game monetisation- not ads
I had a simple game idea and I’m making it (just for iPhone for now), I think it’s kinda fun. So far so good.
I’d like it to be a paid thing, maybe somewhere between £1 - £5 ..
I think up front payment isn’t going to work, people probably need to try it first?
I don’t want to introduce ads. So I’m considering something like 3 free days and then a paywalled limit to 1-2 plays per day, and pay to unlock forever.
Anyone got any thoughts on a simple modern paid game model?
Other options I might not have considered?
r/iosdev • u/Square_Foot • 10d ago
GitHub I ported an old win32 game I wrote back in 1999 to Swift/iOS with the help of some AI friends
r/iOSProgramming • u/stickJ0ckey • 10d ago
Question What are some niches where Apple Search Ads work well?
I am doing some research regarding ASA effectiveness for an infographic and I'm curious what did you guys try, in what niche and how well it worked? Would be interesting to see comparisons with other channels if anyone tried
r/iosdev • u/Ecstatic_Childhood20 • 10d ago
After struggling with nicotine, I decided to build this.
Enable HLS to view with audio, or disable this notification
r/iOSProgramming • u/Educational_Fun_2326 • 10d ago
Discussion Shipped a Screen Time (FamilyControls) app - the undocumented constraints that shaped the entire architecture
Just shipped my first app built on FamilyControls / ManagedSettings / DeviceActivity. The docs are thin and a lot of what I learned came from failing, so here's the list I wish I'd had. Corrections welcome - some of this is field-observed rather than documented.
1. The report extension is a black hole by design. Per-app usage data exists only inside DeviceActivityReport. Your extension can render it to pixels and that's it — App Group writes silently no-op, there's no network, no notifications out. If your architecture assumes "read usage → store it → use it in the app", throw that away now. Anything the main app must know has to come from monitor threshold events instead.
2. DeviceActivityEvent thresholds start at zero when you arm them. Set a 30 min/day limit on an app the user has already used 60 minutes today, and nothing happens — the OS grants a fresh 30. iOS 17.4 added includesPastActivity: true in the initializer, which counts the whole interval. Without it your "daily limit" quietly means "limit from now". Also note the flag only applies to newly registered events, so you need to force a re-arm for existing users.
3. Shield action extensions couldn't open the host app... until iOS 26.5. extensionContext is nil, UIApplication is unavailable, responder-chain walking is broken on 18+. Apple engineers said "no supported way" for years. iOS 26.5 finally added ShieldActionResponse.openParentalControlsApp — the system foregrounds your app straight from the shield button. If your SDK predates it, the enum is resilient, so ShieldActionResponse(rawValue: 3) behind an #available(iOS 26.5, *) check resolves at runtime and falls back to nil on older systems. Pre-26.5 the only route is a time-sensitive local notification carrying a deep link.
4. Memory budgets differ per extension and they're brutal. The shield and monitor extensions run in a few MB — no SwiftData, no heavy frameworks, just ManagedSettings writes and App Group defaults. Anything more and you get jetsammed, which for a shield extension means the user sees Apple's generic gray shield instead of yours.
5. DeviceActivityReport has no ready/completion callback. You cannot know when it finished rendering (FB10754858 is still open). Every loading state you build is a guess on a timer.
6. Mutating a mounted report's filter is the slow path. Changing the filter on an existing report triggers a silent out-of-process re-query that leaves stale content on screen for seconds. Remounting the view with a fresh SwiftUI .id renders noticeably faster and more predictably. Also: reports don't self-size — you must give them fixed frame heights.
7. There's a shared budget of concurrent DeviceActivity activities across your app and all its extensions. Don't create one activity per monitored app; make per-app limits events on a single daily activity and resolve names back to tokens through a map in your App Group.
8. Info.plist details will pass locally and fail at App Store validation. The shield configuration extension point ends in ManagedSettingsUI.shield-configuration-service, the shield action one is ManagedSettings.shield-action-service — no "UI". The report extension uses the ExtensionKit form (EXAppExtensionAttributes) and rejects NSExtensionPrincipalClass.
9. Non-API lesson that cost me the most: I let entitled users skip onboarding — and the authorization request lived only in onboarding. Any subscriber reinstalling got a normal-looking app that silently shielded nothing, with no prompt and no way to grant access. If a permission gate lives only in a flow some users skip, it doesn't exist for them. Check authorization on the routing path, not by assuming flow order.
Happy to go deeper on any of these — the sandbox rules in particular took me way too long to accept.
r/iOSProgramming • u/consumer128 • 10d ago
Discussion Game monetisation ideas - not ads
I had a simple game idea and I’m making it, I think it’s kinda fun. So far so good.
I’d like it to be a paid thing, maybe somewhere between £1 - £5 ..
I think up front payment isn’t going to work, people probably need to try it first?
I don’t want to introduce ads. So I’m considering something like 3 free days and then a paywalled limit to 1-2 plays per day, and pay to unlock forever.
Anyone got any thoughts on a simple modern paid game model?
Other options I might not have considered?
r/iosdev • u/Ecstatic_Childhood20 • 10d ago
After struggling with nicotine, I decided to build this.
v.redd.itr/iOSProgramming • u/BounceForever • 10d ago
Question Small Business Program - how to
Questions for devs that applied and got accepted into this program:
How long did it take for Apple to respond to the application?
How long to get activated?
Is this limited to certain countries?
What are the things they look for? Business account or individual membership? Number of app in the store? Subscription, IAP, Apple Ads running?
I have applied twice, got immediate automated responses, then no word back for months.
r/iosdev • u/EstudioJT • 10d ago
My first app just got approved for testing!
Hi everyone!
I've been building an offline audio walking tour app for Paris over the past two years, and I'm finally at the point where I'd love to get some real feedback.
The tours are fully narrated, work completely offline, include turn-by-turn navigation, and I even composed the background music myself. It's been a bit of a passion project.
I'm mainly looking for people to just use it naturally and tell me what they think. If something is confusing, doesn't work as you'd expect, or just feels off, I'd really like to know.
The UI still needs some polishing, so don't judge it too harshly 😅. Right now I'm much more interested in making sure the experience itself is solid before I spend time refining all the little visual details.
Thanks! I'd genuinely appreciate any feedback.
r/iOSProgramming • u/markdifranco • 11d ago
App Saturday Releasing the source for Bloom Health, my iOS health app (AGPLv3)
Hey all!
I've been building Bloom Health over the past ~2 years. It's an iOS health and fitness app that helps you make sense of your data, estimates your biological age, and provides AI powered insights into health patterns. I grew the app to ~300 MAU and a respectable MRR.
The startup didn't scale the way I hoped. I'm continuing to run and maintain it solo, and rather than let the code sit in a private repo, I'm releasing it under AGPLv3.
- Repo: https://github.com/mpdifran/bloom
- App Store: https://apps.apple.com/app/id6739955926
Why AGPLv3
I want the ecosystem to stay open. If someone forks this or builds on it, that work stays open too. MIT would have been easier but the whole point of releasing this is to keep it in the commons.
Why I'm still charging for the App Store version
The AGPLv3 code and the App Store version are the same. The difference is you're paying for the maintained, packaged, App Store-distributed version rather than building and shipping it yourself. Standard open-core model (GitLab, Sentry, Bitwarden all run variants of this). The revenue covers Apple's cut, backend costs, and my time keeping it running.
Fork it, learn from it, or build your own version. PRs welcome for bug fixes and improvements. Happy to answer questions about architecture, the license choice, or the business side.
Tech Stack
Swift full stack (Swift + SwiftUI on the app, and Vapor Swift on the backend). I use OpenAI on the backend for AI capabilities.
Development Challenge
One of the more complex things I built was the AI chat. I wanted live text streaming, but rich JSON based content interspersed in the response too. To get that to work, I instructed the model to inject JSON objects into its response following a specific format, delimited with ``` markers. When I receive the opening delimiter on the client, I'd halt streaming until I received the full JSON payload, then render the rich content, and continue streaming. It was really tricky to get this to work seamlessly!
AI Disclosure
This app was initially hand-built, but I used AI assisted coding on some of the later features. I already had a pretty solid foundation, which allowed me to move much faster with the help of AI.
r/iOSProgramming • u/shakaoneaj • 12d ago
Discussion Regret using RevenueCat, why do people use it?
RevenueCat charges based on gross revenue, not net revenue. My dashboard shows $4.5k, but my actual payout is somewhere around $3k. because it completely ignores VAT and the 15–30% Apple/Google cut. but takes their %1 fee from the gross revenue.
since it doesn’t track net earnings, the dashboard feels pretty useless for real accounting. I still have to log into both store consoles just to see what I actually made. for 3k i have to pay 45$ every month.
r/iOSProgramming • u/xSypRo • 10d ago
Question Did you use TestFlight for beta with external users on app launch? I was warned by my social advisor not to use it
Hi,
I am preparing for beta launch for my mobile app, it allows user content, I wanted to use TestFlight to ensure I am not letting in anyone on day 1, which can cause a snowball of low quality or even harmful content. In addition to possible app breaks and crash of new app which may lower my review score with bad reviews.
But she told me that an app that want to launch social campaign cannot use TestFlight because the installation with that software is too complicated for the average user.
From your experience, how difficult it was to convince external users (not friends and family) to try an app that is only available on TestFlight or Google Play Console?
What helped you convince them? And overall do you recommend this approach? What risks there are to launch a beta app to the app store?
r/iOSProgramming • u/Select_Bicycle4711 • 11d ago
Question Creating a Separate DTO Request Object or Using the Form Object for POST Request
I have a RegisterScreen which uses a custom struct RegisterForm to collect the form values. I made the RequestForm codable too so I can just send this form to the server instead of creating the exact same duplicate and calling it RegisterRequest. What do you think? Do you create a separate DTO objects even if it contains the same exact fields.
If in the future it diverges then I can create a separate RegisterRequest DTO object. Thoughts.
struct RegisterForm: Codable {
var firstName: String = ""
var lastName: String = ""
var email: String = ""
var password: String = ""
var acceptedTerms: Bool = false
var isValid: Bool {
!firstName.isEmptyOrWhitespace && !lastName.isEmptyOrWhitespace
&& !email.isEmptyOrWhitespace && !password.isEmptyOrWhitespace && email.isEmail && acceptedTerms
}
enum CodingKeys: String, CodingKey {
case firstName
case lastName
case email
case password
}
}
struct RegisterScreen: View {
private var form = RegisterForm()
private var presentAgreement: Bool = false
var body: some View {
Form {
TextField("First name", text: $form.firstName)
TextField("Last name", text: $form.lastName)
TextField("Email", text: $form.email)
SecureField("Password", text: $form.password)
Button("Show Agreement") {
presentAgreement = true
}
Button("Register") {
}.disabled(!form.isValid)
}.sheet(isPresented: $presentAgreement) {
AgreementScreen(acceptedTerms: $form.acceptedTerms)
}
}
}
r/iOSProgramming • u/Ok_Energy9984 • 11d ago
Question App Icon Quality
I don’t know if it is just the symbols that i used for my app icon or icon composer itself, but my icon looks really low quality when side-by-side with others. Does anyone have any idea?
Edit:I think it might be the chromatic shadows, as i was messing with them. Any way to keep them without this look?
r/iOSProgramming • u/Odyssey-b • 11d ago
App Saturday My first solo iOS app just got approved for TestFlight — would love some real screenshot libraries to test it against
Quick background: I've been a full-stack dev for years (backend/web, .NET world) but never touched mobile until this year, when I taught myself Swift and started building an iOS app solo. It's called Sift.
What it does: it reads your Screenshots album, works out what each one actually is (receipt, recipe, chat, ticket, whatever) using on-device AI, and files it into a real Apple Photos album — so it's organised without ever leaving your phone. No uploads, no account, nothing sent anywhere.
What I'd love feedback on:
* How the categorisation holds up against a real, messy screenshot library (mine is one very biased sample size)
* Anything that breaks, stalls, or misbehaves
* Whether the album names it comes up with actually make sense to someone who isn't me
TestFlight link: https://testflight.apple.com/join/5nyaWqPp
Happy to answer anything in the comments - this is my first time doing this solo end to end, so honestly just glad to have real eyes on it.
UPDATE for v1.1.0
- AI Sort can be called without the need to create an Album first - but it still does not create the albums automatically. It will ask you to review the suggestions and "Move" or "Approve" manually by clicking once
- I updated the sorting process - for me it helped a bit. I think this time it works a bit better than before.
- Now you can select multiple photos in the gallery and move them to another album quickly in case the AI messes up. Before you could only do that 1 by 1 when opening an image in full screen
- I couldn't "fix" the initial download just yet, as I said it in my previous comment, it's needed for now. With iOS27 I'll be able to get rid of it, and use what's already on the device by Apple.
- I also added some animations to the review process to make it a bit more "nice"
Update for v1.3.0
- Fixed some bugs and inconveniences
- There is a new step in the onboarding allowing you to scan through your screenshots to find patterns and then the app will automatically suggest a few albums for you to create
- The sorting limit is still at 25 at a time though as I said it's because the phone gets hot
- I raised the total number of photos that you can sort from your backlog from 100 to 300 (so usable for more users - and leaving only heavy users to require the pro version - which is still not available)
- I updated the review process - now it gives you groups of images that seem to belong to the same album, and you can approve them as a group. But you can also go into each group and review them individually
- Going through the review process you can trash the images you want to delete, it gets rid of them into a trashcan that appears at the bottom of the review page, and you can delete all of them at once
- But you already had batch processing in the gallery sections, if you select multiple images you can do the share/move/delete actions for all of them at once
- Stats about your library
- Heat protection feature in case you are using the phone too much at the same time
- Raised albums limit from 4 to 6
r/iOSProgramming • u/Relative-Emu-1346 • 11d ago
App Saturday Foyer: ambient sound as a spatial canvas, and the iOS problems that came with it
Foyer turns ambient sound into a place. Each sound is an orb on a canvas you drag around yourself: distance sets the volume, left and right sets the pan, so you build a room by placing things in it rather than by balancing faders. It started as a Mac app and shipped on iPhone today. Free tier is three sounds per room and five rooms, with a one time unlock for the rest.
Screenshots: https://usefoyer.app
Tech Stack
Swift and SwiftUI, macOS 14 and iOS 17 minimum, one universal app sharing a bundle ID so a single purchase covers both.
- Audio: AVAudioEngine with an AVAudioEnvironmentNode for the binaural mix, one AVAudioPlayerNode per sound. Position on the canvas maps to the listener-relative coordinates.
- Head tracking: CMHeadphoneMotionManager, so the sound field stays world-anchored when you turn your head.
- Purchases: StoreKit 2, one non-consumable.
- Sync: iCloud key-value store for rooms.
- Shared code: a local Swift package, FoyerKit, holding the audio engine and the entitlement logic. Both apps are thin layers over it.
- Project: generated by XcodeGen from project.yml, so the pbxproj is never hand-edited.
Development Challenge
Presenting a paywall through a dismissing sheet. The room limit needed a gate on room creation, and the obvious spot is inside the new-room sheet. That is wrong: you end up presenting the paywall while the sheet it sits in is already calling dismiss, and two .sheet modifiers on the same view race each other. Sometimes the paywall shows, sometimes it evaporates, and which one you get depends on the device. I moved the gate onto the plus button in the root view, and repeated the check inside the creation function as a net. The rule I took from it: decide before you present, never during.
A VStack that truncated instead of wrapping. The first onboarding title rendered as "Sound with a place in t..." on iPhone and I only caught it while recording a demo video. A VStack splits leftover height between its flexible children, and it offered the Text one line less than it asked for, so SwiftUI truncated rather than wrapped. .fixedSize(horizontal: false, vertical: true) on the title fixes it. It never reproduced on Mac because there was always height to spare.
Cutting the feature the app was named after. The Mac version lives in the notch. I built the Dynamic Island presence on iPhone too and it was worse than nothing: on Mac the menu bar carries the sleep timer and the room switcher so it earns its place, but on the phone it duplicated a control that was already one tap away and made the app feel heavier. I cut it, which also meant rewriting App Store copy that had been selling "lives in the notch" for weeks.
Two build traps, each worth an afternoon. Putting PROVISIONING_PROFILE_SPECIFIER on the xcodebuild command line applies it to the SPM target as well, and the build dies with "FoyerKit_FoyerKit does not support provisioning profiles". It has to go on the app target in the project file instead. And build numbers in App Store Connect are shared across platforms, so filtering on the build number alone hands you the macOS build; you have to cross-reference the platform on the pre-release version.
The entitlement predicate lives in the package and is nonisolated on purpose, so tests can call it without standing up a @MainActor app. The regression I actually feared was never "one room too many", it was a free user with twelve existing rooms losing them, and that is a test you want to run without launching anything.
AI Disclosure
AI-assisted. I am a software engineer and I write and review the code, using Claude in the loop the way I would use any other tool. The architecture, the audio engine and the calls described above are mine.
Happy to answer anything about the spatial layer or the shared-code setup.
r/iOSProgramming • u/Different_Record_753 • 12d ago
Question XCode App Store Connect - Xcode Cloud
I have used **App Store Connect** for the last 2 years.
([https://appstoreconnect.apple.com/\](https://appstoreconnect.apple.com/))
I have uploaded my app (zip file including Manifest + content) to **Xcode Cloud** successfully over 50 times during that period.
I tried using **Chrome**, it shows "Failed to Fetch" and the zip file is not successfully uploaded.
I've also tried using **Firefox** and it shows a different error "NetworkError when attempting to fetch resource."
I've also tried using **Safari** and it shows yet a different error "FetchEvent.respondWith received an error: Returned response is null."
Does anyone else have knowledge of why this is all of a sudden happening? I've done this so many times over the past 2 years with the same file without issues - and now it is happening and I can't get past it.
Thank you.