Managing Complication Privacy
For every complication you provide, it’s important to think about its privacy implications. For our water example, it’s probably not a big deal if the user’s watch is locked but their water consumption is still displayed on the watch face. For a calendar, that can be trickier—you may not want your co-workers to know about your upcoming midnight snack! Other apps are pretty clearly privacy concerns: a complication that shows your bank account balance, for instance, should definitely not display when the user’s watch is locked.
One of the CLKComplicationDataSource methods you’ll implement in your ComplicationController is getPrivacyBehaviorForComplication(_:withHandler:). The handler for this method takes a CLKComplicationPrivacyBehavior ...
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