Post

Replies

Boosts

Views

Activity

Reply to WidgetBundle with ControlWidget does not work on iOS 17
@devdevdev I think this should work var body: some Widget { widgets() } func widgets() -> some Widget { if #available(iOSApplicationExtension 18.0, *) { return iOS18Widgets } else { return iOS17Widgets } } @WidgetBundleBuilder var iOS17Widgets: some Widget { LiveActivityWidget() HomeScreenWidget() LockScreenWidget() } @available(iOSApplicationExtension 18.0, *) @WidgetBundleBuilder var iOS18Widgets: some Widget { LauncherControl() LiveActivityWidget() HomeScreenWidget() LockScreenWidget() } It combines the idea of this thread with the workaround mentioned in https://www.avanderlee.com/swiftui/variable-widgetbundle-configuration/
Sep ’24
Reply to SwiftData Crash On Models With Relationships Deletion
I do also face the crashing in the same situation. I have a parent child relationship which have a 1:many relationship. Deleting child elements works fine, but as soon as I want to delete the parent the application is crashing for me in Xcode 15.0 Beta 2. I do hope this is still a beta issue or there is some official of way of deleting such a relationship gracefully in the future.
Jul ’23
Reply to AppIntentsPackage protocol with SPM package not working
Hey @joeycarmello thanks a lot for your hint. This actually fixes the compilation error, so building works fine but then the app shortcut does not show up in the Shortcuts app. But if I then remove the prefixes again and build again it works. But - if I then do a clean and try to build again it fails with the initial error message. All in all, very weird tbh. I currently assume that the setup I have is not fully compatible with the current beta. Which I really do hope gets fixed with the next beta though.
Jun ’23