Save Complication Bundle in Watch Simulator isn't working

I'm trying to create a complication bundle for my app by following these instructions:


https://developer.apple.com/library/prerelease/content/releasenotes/WatchKit/AddingComplications/index.html#//apple_ref/doc/uid/TP40017258


However, the generated gallery.ckcomplication bundle only contains a single file named complicationManifest.json. That file contains a single key, supported complication families, and the value for the key is an empty dictionary.


If I try to save the complication bundle again in the same session, I get this error dialog:


Failed to save complication bundle.

clockkitutil terminated with an unexpected status: 256 : exited? 1,1 signaled? 0,0 stopped? 0,1


My app supports a variety of complication sizes and I'm able to select them when editing a watch face.


I've implemented getLocalizableSampleTemplateForComplication: in my ComplicationController and verified it is getting called and generating valid templates (FWIW, all of my templates are image only templates except CLKComplicationFamilyUtilitarianLarge, which contains a non-localized text provider with my app name).


I'm assuming I missed a step or have some sort of configuration error with either my watch app target or watch app extension target. Has anyone else run into this? Any ideas on what settings I should check or things I should try?

Replies

Did you ever figure out how to fix this? I keep getting an identical error:


Failed to save complication bundle.

clockkitutil terminated with an unexpected status: 256 : exited? 1,1 signaled? 0,0 stopped? 0,1


However in my case, it seems like it actually creates the bundle successfully. I was able to succesfully create a bundle previously. Now I've added localizations, and it looks like basically the same stuff plus the localization files. But I definitely don't want to assume everything is fine.


I've tried cleaning the project, cleaning the build folder, restarting, upgrading to Sierra. The complication itself seems to work fine on my watch, including the localizations I added.

No, unfortunately I haven't been able to figure out what's going on. I'm still getting an essentially empty ckcomplication bundle when I save and I get that error message when I try to save the complication bundle again.

Alright, I spent a good 2 or 3 hours on this and finally learned a few things:


  • If I remove ckcomplication.strings from my project, it works fine, no errors. Actually, removing all the translations except for the Base works fine too. Really bizarre. My placeholders don't actually use any localized text, so I'll probably just remove ckcomplication.strings, generate the bundle, then add it back.
  • I've inspected the bundle carefully that does include ckcomplication.strings, and I'm confident everything is there and correct. It creates folders and files for all the languages and strings that it should. So if anyone else is running into the problem I was where it shows this error, but seems to create the bundle successfully… you can probably safely ignore it.
  • Multiple times during my testing it would either create an empty folder, or only create the complicationManifest.json file, and then hang forever. When this happened I would hit the stop button in Xcode, quit the Watch simulator, then run the app again. That consistently got it working again, at least temporarily.
  • Xcode 8.1 beta 1 does not fix the error.


jmarr, assuming you do have a ckcomplication.strings file, I would try removing it and creating the bundle again. It's hard to say for sure but my hunch is that the error is actually unrelated to your problem. One thing that might be worth doing is going to your project settings, selecting the watch extension target, and unchecking all but a single complication in the "Complications Configuration" section. That way if it's getting hung up on something you can at least narrow your focus.

I had the same issue with Xcode 12 and watchOS 7 simulator - it didn't create all of the expected files, supported complication families was empty. It seems this may not be relevant to watchOS 7? I switched to the watchOS 6 38mm sim and it didn't work but at least threw an error alert that said a template wasn't provided for one of the family types (because that's only supported on Series 4 and later). So I switched to the 44mm Series 4 sim and this time it worked without issue.