Post

Replies

Boosts

Views

Activity

Reply to Troubles with CFBundleDocumentTypes and photos
Thanks for the response. I'm aware of share extensions, but they appear above the sharing app and are totally separate from the main app's data. Using a share extension is going to require breaking down my code into frameworks and also finding ways to update shared data that the share extension can use from my main app. If I can simply open the image in my app (as in the example apps I mentioned above, like Instagram, Obsidian, etc), then all of that complexity is gone. However, it seems like CFBundleDocumentTypes (at least as I've configured it) will only achieve what I want when sharing a single photo from the Photos app. It doesn't work in Safari or Mail, or if I've selected multiple photos in the Photos app. These other apps are able to do all of those things, and yet they switch control to the receiving app instead of just appearing over the sending app like a share extension. How can I do the same thing?
Jan ’25
Reply to My SwiftUI code is becoming un-SwiftUI-y. I'm looking to make things right again.
Try using a didSet on each of the AppStorage fields. This can either: immediately call updateAvailableWords whenever there's a change set a flag indicating that availableWords is out of date; make availableWords a computed property that updates itself only if that flag is true Also, I would make availableWords private(set) - external clients should not be manipulating it directly.
May ’24