r/iOSProgramming • • 14h ago

Discussion Something I never bothered to ask when learning Swift... Why is the standard for Attributes to be inline rather than on a preceding line?

Thumbnail
gallery
9 Upvotes

I visually prefer newlines, but code search works marginally better on inlined attributes.


r/iOSProgramming • • 19h ago

Article You Don’t Need ReplayKit to Mirror an iOS App

Thumbnail
soumyamahunt.medium.com
5 Upvotes

I wanted a live view of a running iOS app in the browser for a design/QA tool, with its element tree, and click-to-highlight working in both directions. ReplayKit was the obvious choice, but it means a consent dialog every session, a broadcast extension, and capturing the whole system when I only wanted my own app.

It turns out you can skip it entirely, with no consent dialog and no extension, and secure content still stays hidden.

I wrote up how it works and the trade-offs. Has anyone tried something similar?


r/iOSProgramming • • 7h ago

Question CLMonitor misses geofence events on a locked phone

2 Upvotes

We're moving from legacy CLLocationManager region monitoring to CLMonitor. Legacy works reliably for us in the background and while locked. To compare, we run both side by side on the same device (iOS 27.2.1) with the same regions.

Setup
CircularGeographicCondition (>= 100 m, under 20 conditions), CLServiceSession(authorization: .always) retaken at every launch, one task always awaiting monitor.events.

Problem
iOS relaunches the app in the background for an entry while the phone is locked. CLMonitor.h says to wait for UIApplicationProtectedDataDidBecomeAvailable before creating a CLMonitor, so we wait. The app is suspended before unlock, the monitor is never created, and both that entry and the later exit are lost. Legacy catches both.

But the same header says Core Location stops monitoring a condition if an event is pending and no CLMonitor is configured to receive it. And Apple's own sample creates the monitor at launch with no protected-data check.

Has anyone shipped CLMonitor geofencing that works on a locked phone? Do you create the monitor immediately on a background relaunch (after first unlock since boot)? Ever seen persistenceUnavailable when you do?

Also asked on the Apple Developer Forums: https://developer.apple.com/forums/thread/861070


r/iOSProgramming • • 8h ago

Question apple ads campaign no running ad groups

2 Upvotes

nothing is starting any help ?


r/iOSProgramming • • 18h ago

Article Open-sourced Snagless: SwiftUI @Environment crashes caught at build time, using SwiftSyntax

2 Upvotes

Our codebase has hundreds of `@Environment` call sites. Any one of them can crash in production with "No Observable object of type X found" if a view gets shown without the value injected somewhere above it, and the compiler can't see it. Every fix I found started with "first, change all your call sites."

So I built Snagless, a SwiftPM/Xcode build plugin. It reads your SwiftUI source with SwiftSyntax, works out which view shows which across modules, and fails the build when a view can appear without a value it needs. Zero code changes, about 90 ms on a 431-file app.

Built with Claude Code, and the write-up is upfront about every time the AI was wrong and what caught it.

Write-up: https://tarek-builds.dev/p/swiftui-environment-crashes-compile-just-fine-so-i-made-them-fail-the-build/
Repo: https://github.com/tareksabry1337/snagless

Happy to answer questions.


r/iOSProgramming • • 9h ago

Question Niche question, anyone successfully built a crossplatform (ios+macos) app that shares one entry for Focus mode?

1 Upvotes

This is super specific. But just in case anyone came across this. I built a cross platform app (iOS + macos) using the default template and everything is done with SwiftUI. Seems look to work great. Except for one thing.

For whatever reason, even though the two apps have the same BundleIdentifier they are treated as two separate apps in terms of Focus mode's allowed apps. And the worst thing is that you can add the iOS app to say "Work focus" and separately add the macOS app to also the same Work focus, but it will conflict and the OS will choose to keep one. So only ever one side will be "allowed" in work focus mode. What is the right way to tell the OS that they are really the same app?


r/iOSProgramming • • 10h ago

Tutorial Agentic indie iOS development cookbook

1 Upvotes

I have spent about a year learning iOS development from scratch and utilizing agents extensively in the process to build my first app. The result is 1300 swift files, and quite a few lessons learned along the way. I've compiled these into a list of problems and their solutions - I hope you'll find them useful: https://finallyclearsky.com/blog/agentic-indie-ios-development-survival-kit


r/iOSProgramming • • 14h ago

Discussion If I had to build an app, I wouldn't choose Jetpack Compose—especially if it's for creating UIs for iOS.

Thumbnail youtrack.jetbrains.com
1 Upvotes

VoiceOver misses accessible elements generated by the Compose tree.

VoiceOver sometimes gets confused when navigating between containers.

Jetpack Compose’s technical choices limit VoiceOver’s proper functioning, particularly the decision to use a lazy tree to improve performance.

And the developers don’t seem to be able to fix all these reported issues.


r/iOSProgramming • • 19h ago

Question Checking if anyone else has run into this - currently trying to migrate from an Individual to Organization account, and my Agreements have been stuck at "Pending (New Legal Entity)" for 3 weeks now.

Post image
1 Upvotes

EDIT: It turns out I needed to add my bank account back - it was in the "See more" section so I thought it was marked as added, but you need to click the "Add account" button and choose it from the existing accounts. As soon as I did that, it flipped to Active.

I've been unable to push any new app builds (even to TestFlight) for 3 weeks because my Agreements aren't marked as active. I reached out to Apple Developer Support twice with no response for 2 weeks now. I'm not really sure what to do.

Checking with this group in case anyone has run into this and if there is anything I can do to get this process moving. Apple Developer Support has been unacceptably slow/unresponsive, especially when this is a required paid service.


r/iOSProgramming • • 1h ago

Tutorial iOS 27.1: DeviceHinge

Thumbnail
antongubarenko.substack.com
0 Upvotes