Post

Replies

Boosts

Views

Activity

Reply to WidgetBundle with ControlWidget does not work on iOS 17
The following seems to work on both iOS 17 and iOS 18 var body: 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() }
Jul ’24
Reply to LockedCameraCaptureExtension how to debug?
I dug around and found this in Console: [xpcservice<com.fifteenjugglers.solarwatch.SolarARCamera([osservice<com.apple.SpringBoard>:34])>{vt hash: 120182604}:2718] Terminating with context: <RBSTerminateContext| explanation:LockedContentServices deleting contents of extension data container reportType:None maxTerminationResistance:Interactive attrs:[ <RBSPreventLaunchLimitation| <RBSProcessPredicate <RBSProcessBundleIdentifierPredicate "com.fifteenjugglers.solarwatch.SolarARCamera">> allow:(null)> ]> Also it seems like the UI loads correctly if I remove the ARSCNView which renders the solar path from my camera UI.
Jul ’24
Reply to parallelizeBuildables flag can result in failed builds
After many attempts trying to figure out what was going on, I was able to resolve this by modernizing the project structure: Getting rid of the two single platform targets building the SolarKit framework in favor of splitting the SolarKit framework into two multi-platform frameworks which build on top of each other: CoreSolarKit for the basic functionality with watchOS support and ExtendedSolarKit which does not support watchOS. Converting the watch app target to a single watch app instead of old fashioned app+extension. Ensuring all target dependencies are explicit and that the app targets correctly bundle the correct non-system frameworks. I hope this helps somebody.
Sep ’22
Reply to URLSession Requests from a Widget
Answering my own question: This works just fine. Here is a great tutorial on how to use URLSessions in widgets. (tl;dr: no special considerations necessary) (This does not allow me to link the URL but search for Oliver Binns WidgetKit) In my case the problem was because with data from the network, my widget was running against the 30MB memory limit.
Jul ’20