Post

Replies

Boosts

Views

Activity

WidgetCenter.reloadTimelines allowed frequency?
I'm writing a widget for a music app. The widget is similar to the Apple Music app's Recently Played widget. I want to call WidgetCenter.reloadTimelines when the currently played song changes, so that the widget refreshes to show the currently played song. Songs last about 3-4 minutes on average, but a user can skip songs or otherwise manually choose different songs more frequently than that. Will my widget be penalized if the reloadTimelines call is made every 3-4 minutes? If so, what is the suggested algorithm for keeping the widget up-to-date in this situation? It's not a good user experience to simply implement 15 minute throttling, as users will mistrust the widget if it is typically several songs out of date. Is it recommended that the app try only refresh the widget when the app loses focus? What about the case of a music app that is playing a playlist of short songs while in the background? In that case the app is not "in focus" in the first place. For reference, here's an example Apple Developer Forum post where the comment is made that changing a timeline once a minute is too fast, and that a target of once every 15 minutes is a reasonable target. https://developer.apple.com/forums/thread/653265
3
0
1.1k
Jul ’20
Debugging WidgetKit install error "Failed to get descriptors for extensionBundleID"
I'm trying to create an iOS 14 WidgetKit widget. It's compiling, but when I try to run it, on either simulator or device, I get the error below: Any suggestions on how to debug this? Details SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget 'com.myapp.dev.WidgetKitExtension' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Failed to get descriptors for extensionBundleID (com.myapp.dev.WidgetKitExtension)" UserInfo={NSLocalizedDescription=Failed to get descriptors for extensionBundleID (com.myapp.dev.WidgetKitExtension)}." UserInfo={NSLocalizedDescription=Failed to show Widget 'com.myapp.dev.WidgetKitExtension' error: Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Failed to get descriptors for extensionBundleID (com.myapp.dev.WidgetKitExtension)" UserInfo={NSLocalizedDescription=Failed to get descriptors for extensionBundleID (com.myapp.dev.WidgetKitExtension)}., NSUnderlyingError=0x7fc0b0d12540 {Error Domain=SBAvocadoDebuggingControllerErrorDomain Code=1 "Failed to get descriptors for extensionBundleID (com.myapp.dev.WidgetKitExtension)" UserInfo={NSLocalizedDescription=Failed to get descriptors for extensionBundleID (com.myapp.dev.WidgetKitExtension)}}} Domain: DTXMessage Code: 1- System Information macOS Version 10.15.5 (Build 19F101) Xcode 12.0 (17177)
34
0
19k
Jun ’20