ClockKit

RSS for tag

Display app-specific data in the complications on the clock face using ClockKit.

ClockKit Documentation

Posts under ClockKit tag

7 Posts
Sort by:
Post not yet marked as solved
0 Replies
114 Views
https://developer.apple.com/documentation/clockkit/creating_and_updating_a_complication_s_timeline I just run sample app to check background delivery on health kit. I added caffein on my health app on phone. but it dosen't triggered on obeserver processUpdate function. func processUpdate(query: HKObserverQuery,             completionHandler: @escaping () -> Void,             error: Error?) {     print("processUpdate come!!!!")     logger.debug("Received an update from the background observer query.")           // Check for any errors that occur while setting up the observer query.     guard error == nil else {       logger.error("Unable to set up a background observer query: \(error!.localizedDescription)")       fatalError()     }           logger.debug("Responding to a background query.")           Task {               // Load the updated data from the HealthKit Store.       let success = await loadNewDataFromHealthKit()               // Check for any errors.       guard success == true else {         logger.error("Unable to query for new or deleted caffeine samples.")         fatalError()       }               // Call the completion handler when done.       completionHandler()     }   }
Posted
by kotran.
Last updated
.
Post marked as solved
2 Replies
226 Views
I have a simple complication-only app called Roughly, which shows the approximate time in words, to the nearest five minutes, in a choice of languages. It's been on the store for several years, and it's getting creaky. This new guide to WidgetKit is making me nervous: https://developer.apple.com/documentation/widgetkit/converting-a-clockkit-app There's a line buried in there: watchOS 9 and later no longer shows families like CLKComplicationFamily.circularSmall, CLKComplicationFamily.modularSmall, or CLKComplicationFamily.modularLarge on watch faces. So... is that the end of all basic complications that haven't been made into Widgets? If so, it would be good to have more clarity on this — I do feel it's easy to miss when things are deprecated. Thanks for any info!
Posted Last updated
.
Post not yet marked as solved
1 Replies
247 Views
I have one user that is getting some very odd behavior for one of my complications. The complication will work fine for a little bit, but then gets into a state where when the watch is asleep it is displaying correctly and then when the watch wakes up it's the default dashed out view with the app name. This is happening on a Watch Series 5 with cellular that is on the latest WatchOS (8.5). It was also happening on 8.4.2. All of the other complication types work perfectly fine on their watch. It is just this specific one, which other than the way the view is laid out is no different than the others under the hood. They all share the same data. The problem complication uses CLKComplicationTemplateGraphicRectangularFullView and the only thing I can think of is that maybe there is an issue with support on the Series 5. Though I have no evidence to support this theory since there isn't any helpful log messages. Testers on Series 6 and Series 7 report zero problems with this complication. I have added in a special view for when this complication fails for whatever reason, at least whatever reason I can capture and it is never displayed. It just shows the generic Apple dashed out view. So it seems something else is going wrong under the hood. Any and all help would be much appreciated.
Posted Last updated
.
Post not yet marked as solved
2 Replies
924 Views
In my iOS app, I check to see if there's an active complication before sending complication data to the watch, given the limit of 50 transfers per day. It seems isComplicationEnabled() always returns false in the simulator, even though I have a watch app in a watchOS simulator that's active and running, with complications that actively get updated from the watch code as well. Data is successfully being passed from the simulated iPhone to the simulated watch app - both are active, connected and otherwise in sync. When I run using a physical device, WCSession isComplicationEnabled() on my iPhone does return true, but it seems to always be false in the simulator. Is this a limitation? Bug? Anyone else seeing this?
Posted
by ryoustra.
Last updated
.
Post not yet marked as solved
1 Replies
706 Views
My codes : CLKWatchFaceLibrary().addWatchFace(at: url) { (error) in print(error) } I can add other watch faces except Memoji watch face. The error is Error Domain=CLKWatchFaceLibraryErrorDomain Code=4 "IMPORT_FACE_ERROR_FACE_NOT_AVAILABLE" UserInfo={NSLocalizedDescription=IMPORT_FACE_ERROR_FACE_NOT_AVAILABLE}
Posted
by tpian928.
Last updated
.
Post not yet marked as solved
0 Replies
396 Views
Anyone dealt before with Apple Watch complications accessibility? I'm using CLKComplicationTemplateGraphicCornerGaugeText to display custom data but VoiceOver adds degrees (º) after saying the value. I've tried with accessibilityLabel on CLKTextProvider but doesn't fix it. Any idea? Thanks in advance!
Posted
by Rubenfern.
Last updated
.
Post not yet marked as solved
0 Replies
427 Views
I have successfully created a complication in Large text for the modular face which creates a countdown timer. However, when the countdown gets to 0, it starts to count up. This is similar to a timer in storyboard where you need to stop the timer or it counts up. However, I can't find a method to stop the time from counting up in a complication. I have tried to use the getTimelineEntriesForComplication function to create a new template after the countdown finishes to show 00:00, however, it doesn't seem to work. Has anyone successfully created a countdown complication in which it stops at 0? If so, how did you complete that task.
Posted
by mbollon.
Last updated
.