r/iOSProgramming • • Jun 24 '26

Question Do you see missing Environment as a big issue in SwiftUI?

0 Upvotes

I think the title should be "Do you see runtime error for missing Environment a big issue as compared to being a compile time error?"

Let's say you have the following code:

struct LoadingDemoApp: App {

private var productStore = ProductStore()

var body: some Scene {
WindowGroup {
ProductListScreen()
}
}
}

As you can see I forgot to inject productStore through Environment. When I run the app and use Environment(ProductStore.self) in the view, it can cause an exception.

Fatal error: No Observable object of type ProductStore found. A View.environmentObject(_:) for ProductStore may be missing as an ancestor of this view.

My question is that how often do you run into this fatalError in production? Is that error an enough reason for your apps to not use Environment for dependency injection and use constructor/initializer dependency.

Does the error justify not using Environment at all and start using initializer to pass dependencies?


r/iOSProgramming • • Jun 24 '26

Discussion I got tired of my laptop and my CI runners never being the same machine, so I built a tool that makes them one image

0 Upvotes

For native iOS/macOS work I kept losing afternoons to the same thing: my laptop and my

CI runners were never the same machine. Xcode point releases drifted, Ruby was 3.4.3 on

CI and who-knows-what locally, CocoaPods caches were warm in one place and cold in the

other. A green build locally meant nothing about CI.

So instead of trying to keep two environments in sync, I built Graft — you bake one

golden Tart VM image with your toolchain and warm caches, and run *both* your dev

environment and your ephemeral CI runners off it. Same image, nothing to sync.

Three pieces:

- Bake a golden image from a declarative .graft file (Xcode/Node/CocoaPods + warm caches).

- Develop *inside* it over VS Code Remote-SSH — Codespaces, but for native macOS/iOS,

off the exact image CI uses.

- Ephemeral GitHub Actions runners: each VM boots, runs one job, tears down.

Open-source (MIT), Apple Silicon only. I run my day job's production CI on it. Linux is

planned but not there yet, and I'm honest about that in the README.

Repo: https://github.com/arborist-sh/graft

Writeup on the why: https://theotherbriancorbin.com/field-notes/it-works-on-my-machine

Curious whether the dev-and-CI-on-one-image thing resonates for other native devs, and

where it'd break for your setup.


r/iOSProgramming • • Jun 23 '26

News Swift Package Index joins Apple

Thumbnail swiftpackageindex.com
28 Upvotes

r/iOSProgramming • • Jun 23 '26

Question Is App Store Connect website broken currently?

37 Upvotes

Is App Store Connect website broken currently?

I login from my Mac, it logs in successfully. Then it shows a spinner, then an error message pops up, but my apps still load fine. When I click on an app, it shows details for a second and then loops back to the login screen. I have tried a few times and this keeps happening and I am unable to proceed.

This was working fine last night.

EDIT: Sometimes after login, the spinner just keeps loading forever.

EDIT 2: Sometimes it works now, sometimes it doesn't. Now I get error when I "Add for review".


r/iOSProgramming • • Jun 24 '26

Question Trial-to-paid conversion stuck at ~1%

0 Upvotes

Hey everyone,

I run an iOS subscription app using RevenueCat with StoreKit 2. I offer a monthly and a yearly plan, with a 7-day free trial on the yearly plan.

For the past several weeks my trial-to-paid conversion has been sitting around 1.4%, which is far below normal. I'd been assuming it was billing problems or just weak demand.

When I dug into my logs (both DEBUG and RELEASE, on a real device), I noticed this on every launch:

WARN: No packages could be found for offering with identifier default.

It turned out my current offering (default) was pointing at RevenueCat Test Store products instead of my live App Store products. So real users were likely hitting a broken or empty paywall. My app had a custom fallback that tried to assemble packages from other offerings, which masked the problem instead of surfacing it.

I've now repointed the default offering to the correct App Store products.

I'd love some help with a few things:

  • Does this sound like the likely cause of such a low conversion rate, or should I be looking elsewhere too?
  • For anyone who's fixed a similar empty/misconfigured offering — how quickly did conversion recover for new cohorts?
  • Any advice on cleanly removing custom offering logic and going back to standard offerings.current + purchase(package:)?

Thanks in advance — happy to share more logs or config if helpful.


r/iOSProgramming • • Jun 23 '26

Question Is there any way to speed up sharing cache symbols from an Apple Watch to Xcode?

6 Upvotes

I just waited almost an hour for my watch to sync its cache symbols to Xcode so I could begin to run my apple watch on it

I did this under what I think were ideal conditions i.e. phone plugged in via USB C, and watch on wrist unlocked near phone

Is there any way to speed this up?

Am I allowed to leave my watch on the table (locked) and it'll still load so I can go do other things?

If I walk into another room with my watch on my wrist while my phone is still plugged in will this still transfer?

I feel literally tethered to my laptop. So dumb. Surely there's a way to make it take less time I'm missing


r/iOSProgramming • • Jun 23 '26

Question Apple Ads team reached out to me directly — has anyone gone through this?

9 Upvotes

I recently received an email from Apple’s Ads team because I’m already running Apple Ads campaigns for my iOS apps.

The conversation started with a representative reaching out and offering help with campaign structure, keyword optimization, performance improvements, and aligning Apple Ads with my business goals. Later, another member of the team followed up and scheduled a 30-minute call with me.

For context, I’m an indie iOS developer with a few apps on the App Store. My Apple Ads spending is modest, and I wasn’t actively seeking consulting or account management support, so I was somewhat surprised to be contacted directly.

The emails appear legitimate. They come from @apple.com addresses, and Apple Mail displays them as digitally certified with the verified brand logo (BIMI), which requires email authentication and brand verification. So I’m fairly confident this is actually Apple’s Ads team and not a phishing attempt.

I have a meeting scheduled soon, and I’m curious:

Has anyone here had a similar call with Apple’s Ads team?

What should I expect from the conversation?

Is it mostly educational, or are they trying to increase ad spend?

Did you receive useful optimization advice that actually improved performance?

Were there any recommendations that had a measurable impact on CPI, CPA, or downloads?

Anything I should prepare before the meeting?

I’d love to hear experiences from other indie developers who have gone through this process.

Thanks!


r/iOSProgramming • • Jun 23 '26

Question How do you automate iOS app tests?

17 Upvotes

Every time we release a new version of our app, we need to verify that the main user flows still work as expected, even when the change is something as small as a single button.

How are you automating end-to-end tests for your iOS apps?

I'm talking about launching the app, interacting with the UI, and validating real user journeys, not unit tests that only test the code itself.

What tools or approaches have worked well for you?


r/iOSProgramming • • Jun 24 '26

Discussion Building a conversational LLM coach with tool-use into a SwiftUI/SwiftData app — what I learned (and what still breaks)

0 Upvotes

I’m building a strength training app solo and the part that got genuinely hard wasn’t the UI — it was wiring an LLM coach that can actually do things in the app, not just chat. Sharing the architecture and a few things that bit me, curious how others have solved the same.
Stack: SwiftUI + SwiftData + @Observable, Supabase edge functions as the backend, Anthropic Claude for the coach. HealthKit feeds recovery signals (HRV, sleep, resting HR) that get scored into a readiness value, which the coach reasons over.
Tool-use: the coach has a small, fixed set of tools (swap exercise, add note, remember context, acknowledge). Keeping the tool surface tiny made parsing and execution way more reliable than an open-ended “do anything” design. I run the model in an edge function and parse tool calls server-side before they touch SwiftData.
What still breaks: streaming over SSE occasionally drops (“network connection lost”) on cold starts or large context. Considering context-trimming + a retry affordance on the client. If anyone has a robust pattern for SSE reliability between an edge function and URLSession, I’d take it.
Open question for the sub: how are you handling LLM cost per user? My unoptimized baseline is ~$1.10/user/month; I’m planning prompt caching on the static system/context blocks to cut input cost.
Screenshot of the readiness-driven UI attached. It’s live (German-only), but I’m here for the engineering discussion, not a pitch — happy to go deeper on any of the above.