iOS 17 StandBy Mode Opt Out for Widgets?

My app's Widgets on iPhone rely on access to the Health Store to update. This makes them appearing in the new StandBy mode not a good experience as they never update.

Is there a way to opt out of this mode but keep the options for my users to put Widgets on their home screen?

Thanks

Answered by jcgoforth in 763489022

The thing you want to do is possible using disfavoredLocations(for:).

https://developer.apple.com/documentation/swiftui/widgetconfiguration/disfavoredlocations(_:for:)

I also want to ask this question. In addition, I want to opt out of the systemSmall lock screen widget on the iPad. It seems that as long as it is compiled through the iOS 17 SDK, the widget must adapt to all positions.

Accepted Answer

The thing you want to do is possible using disfavoredLocations(for:).

https://developer.apple.com/documentation/swiftui/widgetconfiguration/disfavoredlocations(_:for:)

iOS 17 StandBy Mode Opt Out for Widgets?
 
 
Q