Restricting Complication Families
Sometimes, a particular complication family just doesn’t make sense for your data. A complication to show a random inspirational quote probably wouldn’t make sense in the Modular Small family. To that end, you can tell watchOS which complication families you support, so that it won’t offer your complication to the user on the wrong watch face. In Xcode, open your project settings; then select the NomNomNom WatchKit Extension target. Under the Info tab, there are two key/value pairs of interest. The first, CLKComplicationPrincipalClass, tells watchOS which class it should instantiate to create complication data. In this case, you can leave it at its default value of $(PRODUCT_MODULE_NAME).ComplicationController ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access