WatchKit 2 Complication Text Only Shows Up in Preview

前端 未结 1 714
[愿得一人]
[愿得一人] 2021-01-25 02:18

I\'m trying to develop a very simple complication for watchkit2 that says \"Hi\" from a simple text provider.

I\'ve managed to achieve some strange behavior; I can see t

相关标签:
1条回答
  • 2021-01-25 02:41

    While customizing watch face, Apple Watches calls getPlaceholderTemplateForComplication:withHandler: to show placeholder text. Since you've implemented it - you can see "Hi". That is cool. But when watch face displayed, it calls another methods, such as:

    • getCurrentTimelineEntryForComplication:withHandler:
    • getTimelineEntriesForComplication:beforeDate:limit:withHandler:
    • getTimelineEntriesForComplication:afterDate:limit:withHandler:

    And it seems like you're not implemented them. So implementing these method will resolve your issue. You can find more detailed information about these methods in this WWDC 2015 Tutorial: https://developer.apple.com/videos/wwdc/2015/?id=209

    0 讨论(0)
提交回复
热议问题