简体   繁体   中英

Complications No Longer Updating in watchOS 7

My perfectly working complications in watchOS 6/5/4 don't work in watchOS 7. This is for an independent watchOS app.

It seems that the method getCurrentTimelineEntry doesn't get called although I call reloadTimeline for all complications. If running on the sim getCurrentTimelineEntry does get called from time to time but still the complications don't update.

So what has changed or is this a known bug in watchOS 7?

The problem was that my CLKComplicationDataSource derived class ( ComplicationController ) was never called on the device by the API although it was called seldomly on the simulator!

So there are certainly bugs in the API that require the project to be configured/recompiled for watchOS 7 in order to work.

My configuration required the following new changes:

  1. Set complication images in WatchKit Extension’s Assets.xcassets for all complications. This was optional in watchOS 6 or older.
  2. Implement the new getComplicationDescriptors and programmatically declare all supported complications. The old way of declaring the supported complications in WatchKit Extension’s Info.plist is no longer supported on watchOS 7 even for apps compiled with watchOS 6

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM