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 ...

Get Developing for Apple Watch, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.