Post

Replies

Boosts

Views

Activity

Comment on Unable to distribute watchOS only build
Hi, sorry you having this issue, it's really confusing. If you create new watchOS only project WITHOUT companion iOS apps, you will see it has extra iOS target. This is necessary to distribute the app. It still has only watchOS app. Make sure that watchOS app is really what you need, because you can't add the companion iOS app later, you will have to create a new project. Screenshot https://www.cocoaswitch.com/uploads/2025/screenshot-2025-02-01-at-11.53.57am.png
Topic: App & System Services SubTopic: General Tags:
Feb ’25
Comment on Enabling undo with multi-model schema
Unlike the Hacking with Swift article, I set my undo manager from the environment and it works. The only catch you can't do in the app context, it has to be on a view level. In any content view, we can access undo manager through the @Environment(\.undoManager) var undoManager, then when I create my content view I initiate the background task using the .task modifier, and setting the under manager: modelContext.undoManager = undoManager. It's probably not a best practice though.
Dec ’23