Post

Replies

Boosts

Views

Activity

Reply to Configurable Watch Widgets "Unable to Load" watchOS 26 Issue
Hey Simon. I did try pairing my .intentdefintion file down to the bone and removing just a ton of other code to maybe create an Apple bug report. No help. I will add that my watch and iOS widget code is identical save some conditionalization on widgets to include. I never had any issues with old style recommendations I created and even a sample is still shown. Just the screen to configure gives the "unable to load." Yes, I started migrating to WidgetConfigurationIntent and AppEnum. I was looking for samples to verify configurability on Apple Watch and found a good Medium artcie, but the source code was not directly downloadable. So I created at: https://github.com/t9mike/SimpleStatsWidgetConfigExample But I changed the Water Reminder example to use AppEnum to simplify how the frequency parameter is defined. This does work on Apple Watch no problem.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
4w
Reply to Widget showsWidgetContainerBackground fallback
showswidgetcontainerbackground is iOS15+ according to Apple's docs. But I am seeing crash "Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)" when run on iOS16. I have FB open on this: FB12554533 (showsWidgetContainerBackground Environment variable crashes widget extension on iOS16 with Xcode 15) I was tabling this issue for a few weeks in hopes it gets resolved. Feels like a bug that would hit a lot of people. But perhaps how I am using it is triggering the crash.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’23
Reply to Widget showsWidgetContainerBackground fallback
Check your runtime warnings in Xcode. I have seen it tell me the SwiftUI environment variables can only be used in a view. In my widgets I already have a wrapper view to handle a lot of common things & bootstrap. I have a view "WidgetSetStuff" that sets global variables -- or it could adjust a class object passed in. struct WidgetEntryView : View { ... @Environment(\.widgetFamily) var widgetFamily @Environment(\.showsWidgetContainerBackground) var showsWidgetContainerBackground var body: some View { ... WidgetSetStuff( family: widgetFamily, noMargins: showsWidgetContainerBackground == false, ... ) ... } WidgetSetStuff constructor sets some globals use elsewhere and has EmptyView() body.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’23
Reply to Will Lock Screen Widgets be Configurable?
Yes the UI is terrible. I have a Feedback to allow long press on widget to edit. Crazy it is not supported. I am making a video for my users because I find it so non-intuitive. I encourage everyone to file a FB requesting long press to initiate edit support. My original question was when the intent system was going to be supported on lock screen widgets. It took many betas for it to be added.
Topic: App & System Services SubTopic: General Tags:
Sep ’22