SwiftUI DocumentGroups Are Terribly Limited
This is how little you need to get started[…]
[…]
What the system does is provide a launch scene for you when you only declare a
DocumentGroup
in yourSwiftUI.App.body
. You can customize this by making the launch scene yourself. WWDC24 “Evolve Your Document Launch Experience” contains examples that at least offer to style what’s above the document picker.[…]
So I believe they settled for: throw, and we ignore it; but throw immediately on button press, which means throw twice real quick, then you get an alert, because something’s broken.
[…]
Scene
s cannot contain conditionals, the SceneBuilder does not support this. That means there’s no way to have an app offer different scenes depending on whether or not in-app purchases have been made.
It baffles my mind that SwiftUI DocumentGroup still lacks the ability to programmatically create or open documents in response to external triggers like Quick Actions, Quick Look, Widgets, or the Files app.
Previously:
Update (2025-08-06): Matt Sephton:
I’m currently banging my head against this in my forthcoming pixel art app. Horrible.
5 Comments RSS · Twitter · Mastodon
Document support on iOS, macOS, visionOS, tvOS and iCloud is just a mess. They could‘ve created a perfect solution to have consistent features and UIs on all platforms, but they failed already when they introduced UIDocument. And now the SwiftUI document system is just even worse. There‘s just nobody taking care of this at Apple or this person just doesn’t have any support by the rest of the teams.
> It baffles my mind that SwiftUI DocumentGroup still lacks the ability to programmatically create or open documents in response to external triggers like Quick Actions, Quick Look, Widgets, or the Files app.
It baffles my mind that there are still developers out there that want to use SwiftUI. Speak up now or get what you deserve
@ObjC4Life - Well, I won't touch this. I just started a project using UIKit and Objective-C and it's actually surprisingly refreshing. It's too late to admit that they messed up with Swift or SwiftUI, but they also need to cease this festering wound.
But on another note, what dingbat (since the last time I touched iOS dev) made it so that you can't connect to an api with a self-signed certificate in a local development environment? Crime against humanity, and totally unnecessary.
Another case of the first-party "chosen framework" giving you less functionality and more headaches than alternatives.
@Christian Beyond document differences, the platforms are a disaster. UIKit should have re-merged with AppKit eons ago. iPad OS is re-implementing macOS, but worse. No one at Apple has a direction or vision and devs are getting jerked around. We're not building towards anything on these platforms anymore.
> UIKit should have re-merged with AppKit eons ago
Any idea why that didn't happen? That seemed like the most logical step that would occur, but for some reason didn't happen. Instead, now it seems like they're working more towards merging UIKit and SwiftUI.