APPLEWATCH___ Study Notes (iii) data synchronization on iphone and Apple Watch

Source: Internet
Author: User

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

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.