4

I've just added a complication to my watchOS app. I was able to select it on simulator's watch face, but it shows blank items. Temporary all methods of CLKComplicationDataSource return nil. I've created a new assets group for complication, added all required .png images as specified here, setup Complication Group property in Xcode target, but nothing shows up!

What should I do to enable static placeholder images for my complications?

Configuration in Xcode: enter image description here

kelin
  • 11,323
  • 6
  • 67
  • 104

1 Answers1

3

The problem was that the .xcassets file with placeholder images must be included into the watch extension bundle, but it was included into the watch app instead. I spend all day trying to figure this out.

kelin
  • 11,323
  • 6
  • 67
  • 104
  • Hello kelin could you show me the code that you use to display an image? – unixb0y Jul 27 '17 at 14:27
  • Hi @unixb0y! No code was involved. Just default placeholder images. – kelin Jul 28 '17 at 08:52
  • @unixb0y, the system shows them. [Read here](https://developer.apple.com/watchos/human-interface-guidelines/icons-and-images/). _"Every complication must provide a set of static images to act as placeholders when the system has no other content to display for your complication’s data."_ – kelin Jul 28 '17 at 11:50
  • Thank you, on project creation my watch app had the complications folder in the assets already so i placed them there as well. What a painful few hours – Joe Maher Apr 20 '18 at 02:10