watchOS 3.0 Compatibility

Hi!


When I try to run my app on watchOS I get the following error

dyld: Symbol not found: _OBJC_CLASS_$_CLKComplicationTemplateExtraLargeSimpleImage

However, I do use #available declaration

if #available(watchOS 3.0, *) {
    if family ==  .ExtraLarge {
        let tmpl = CLKComplicationTemplateExtraLargeSimpleImage()
        tmpl.imageProvider = CLKImageProvider(onePieceImage: UIImage(named: "complication_plane_large")!)
        entry = CLKComplicationTimelineEntry(date: NSDate(), complicationTemplate: tmpl)
    }
}

How can I have watchOS 2.0 and watchOS 3.0 compatible app if I use CLKComplicationTemplateExtraLargeSimpleImage in code?


Thank you in advance

Accepted Reply

I've added ClockKit to Link frameworks phase (it wasn't there but worked for watchOS 3) and made it Optional. Now it seems to work.

Replies

I've added ClockKit to Link frameworks phase (it wasn't there but worked for watchOS 3) and made it Optional. Now it seems to work.

Thanks - this worked for me also, as I was experiencing the same issue with my watchOS 2+ app.


Do you know if there are any other side-effects that result from doing this?

Thanks, this helped me too. Oddly, I didn't get any compile-time checking forcing me to use an #available declaration when using newer symbols. Seems like a bug.

Thanks, it works for me too. However I find it odd. For sure there's a bug here.