The WatchKit app is similar to the new app Extension (app extensions) on iOS 8, such as Today Extension (now Extended) and share Extension (share extensions). As long as you have some experience with iOS development, the UI is relatively easy to build. the focus is on how to synchronize the data on iphone and Apple Watch
- -(Nsurl *) Containerurlforsecurityapplicationgroupidentifier: (NSString *) Groupidentifier;
After IOS 8, with this approach in Nsfilemanager, assuming your app already supports the app Group (described later), you must also have groupidentifier, calling this method to return the URL of a local file directory. Simply put it is a shared folder, any application or extension, as long as the Support app group and have the same group ID, it has read and write permissions, so that data synchronization is not a problem. Want to learn more about this can read "IOS 8 Extensions", I can only say that you do not understand it is difficult! However, it is recommended that you read the official Apple document, the same reason, the original is the best.
Although the data can be synchronized, how do I know on Apple Watch that a new task has just been created on the iphone? Do not think, the cost of making wheels is high and prone to problems, it is recommended Mmwormhole, it is a relatively mature and stable third-party open Source Library, used in the app group communication, very easy to use. The principle is not to say, there is a need for students to download research.
APPLEWATCH___ Study Notes (iii) data synchronization on iphone and Apple Watch