ClockKit

RSS for tag

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

Posts under ClockKit tag

4 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Complex functions are not available
When I generate a dial through code, it prompts the following content: code: CLKWatchFaceLibrary * lib = [[CLKWatchFaceLibrary alloc] init]; [lib addWatchFaceAtURL:url completionHandler:^(NSError * _Nullable error) { }]; result: Complex functions are not available How to fix it? Make it usable, Thank you~
1
0
882
Dec ’24
ClockKit to WidgetKit migration bug
Hi, I'm migrating ClockKit complications to WidgetKit. Everything works well except when I run the WidgetKit version, I see complications appear twice each in the complications list for my app when adding them. If I restart the app from Xcode, it won't happen again, only for the first time. But on the actual device, only Watch restart or app reinstall fixes it which is frustrating and would not be ideal for live users. I even tried Apple's example ClockKit project -> added complications to watch face -> added WidgetKit target, CLKComplicationWidgetMigrator and func widgetConfiguration(from complicationDescriptor: CLKComplicationDescriptor) code -> run the app -> new complications appear correctly replacing old ones -> when hold to add/change complications I see it doubled (screenshot attached) and it's even selected twice If I add more complications, they will appear two times as well except one selected in two places almost like it's two same lists created. class ComplicationController: NSObject, CLKComplicationDataSource, CLKComplicationWidgetMigrator { @available(watchOSApplicationExtension 9.0, *) var widgetMigrator: CLKComplicationWidgetMigrator { self } @available(watchOSApplicationExtension 9.0, *) func widgetConfiguration(from complicationDescriptor: CLKComplicationDescriptor) async -> CLKComplicationWidgetMigrationConfiguration? { switch complicationDescriptor.identifier { case "Coffee_Tracker_Caffeine_Dose": return CLKComplicationStaticWidgetMigrationConfiguration( kind: "WidgetKitComplications", extensionBundleIdentifier: "com.example.apple-samplecode.Coffee-Tracker.watchkitapp.watchkitextension.WidgetKitComplications") default: return nil } }
4
0
847
Sep ’24
ClockKit Complications not working with Xcode 14 single-target watchOS app
I’ve created a single-target watchOS app in Xcode 14, but I can’t seem to get ClockKit complications working. I’ve added a CLKComplicationDataSource class to my watch target, and in the Info pane for my target I have set the CLKComplicationPrincipalClass key to MODULE-NAME.ComplicationController I haven’t yet added Complication placeholder images to my Assets.xcassets, but as far as I am aware, that shouldn’t be a problem while I am still testing. However, when I run it on a watchOS simulator, the complications never show up on the watch complications list when adding a complication. All of the tutorials I can find for ClockKit complications reference older two-target WatchKit apps. Do the newer single target apps no longer support ClockKit? If so, how can I make a two-target WatchKit app with Xcode 14? Unfortunately I cannot use WidgetKit for my complications because I need to support watchOS 7 at least, and WidgetKit only supports watchOS 9+ Thanks for your help
3
1
2.2k
Aug ’24