How to establish a communication channel between Apple Watch Extension/App and iOS App

后端 未结 5 787
Happy的楠姐
Happy的楠姐 2021-02-09 05:26

I\'m exploring the WatchKit SDK.

When I have a WatchKit app, is it possible to set values (e.g. Text, settings) from the iPhone app on the WatchKit app? Can I call funct

5条回答
  •  -上瘾入骨i
    2021-02-09 05:51

    There are several solutions: CoreData, NSKeyedUnarchiver and NSUserDefaults. With a common background for sharing the common data resource (Database, file or user default settings), this is enabling App Groups capabilities on both targets project properties.

    enter image description here

    In the following post is explained how to do it with default settings and you can also download the demo project.

提交回复
热议问题