I am on XCode 12.0 beta 5 and Big Sur 11 beta 5. I am writing a configurable widget for macOS. There's no Intents Extension available for macOS target.
If I add one for iOS target, it crashes in Widget Simulator in macOS. If I archive it and export the app, the widget runs but with "unavailable options for selection"
Post
Replies
Boosts
Views
Activity
I am on the latest macOS Big Sur 11.2 RC and XCode 12.4 RC. It seems the bug returns.
The Intent of the Widget fails to load when I export the app in XCode through Archive -> Distribute App -> Copy App.
I am sure that I have cleaned up everything in /Applications and XCode's Build Folder.
It works in Widget Simulator and XCode Build and Run though. But it gives me no confident to submit to App Store in this situation.
May anyone please confirm the Intent situation when exported to an app?
Reply to my own post : I am on macOS Big Sur 11.2 RC 3 and XCode 12.4 Release
I can confirm that the Intent exported in the main app only runs when the main app situations in /Applications
I can also confirm that when we click "Run" in XCode, the Widget in the gallery will call the Intent inside XCode/DerivedData
This causes confusion the version of Intent being called in the gallery.
Therefore when I test the export of the main app,
1) I export the app in XCode through Archive -> Distribute App -> Copy App
2) Clean up the Project Build Folder in XCode
3) Move the exported app to /Applications, but do not launch it yet
4) Open Widget Gallery. Make sure the Widget is absent in the first place
5) (Extra) If the Widget still sticks inside the gallery, I will do a spotlight search to eliminate any possible old versions of the Widget. In some occasions, I even have to reboot to make it disappear.
6) Launch the exported app in /Applications. The Intent will be the version in /Applications
For the DClock in the AppStore, I suspect that the app has used private API (same as the clock.app by Apple) to animate the second hand smoothly. I am not here to disclose the API but a simple Google search will reveal.
It is quite obvious that it is true, since the animation is absolute in sync with Apple's own clock. Frequent calls to WidgetCenter.shared.reloadAllTimelines() can never achieve this.
Just two requests to Apple's Widget team:
1) May Apple please take action and remove any app if private API is used. It is unfair that some developers are gaining advantage.
2) May Apple please release this API as public. A clock widget with hands animation makes sense.