Introduction of AppleWatch Development and application framework of--watch

Source: Internet
Author: User

Introduction of AppleWatch Development and application framework of--watchFirst, Introduction

Apple Watch is undoubtedly a revolution in the field of smart watches, and how to develop practical and aesthetically pleasing applications on watch is an issue that iOS developers are starting to think about, and in some ways, because of the nature and quickness of watch, it has a bigger advantage than the iphone, To grasp these characteristics of watch, develop the most thorough application, you need to change some of the ideas in the iphone development, as a sentence: Only forget the experience, there will be unexpected breakthroughs.

This series of blogs, first of all, summarizes my experience in the development of the company watch project, and secondly, I will add some of my understanding and ideas, if there are errors, please correct me, if it is helpful to you, also welcome to sprinkle flowers,??。

Ii. What we need to prepare before development

If you haven't developed an iphone and come straight to watch, I suggest you don't do it, not not, but now all third-party apps must be based on iphone extensions, native Watch apps, Apple is not yet open to developers, so in fact, There's a limit to what we can do on watch, and maybe Apple will open up more interfaces, but for now, we have to abandon the idea of iphone development and start over.

1. Watch Application Architecture

As stated above, completely out of the iphone's native Watch app, we are not yet able to develop, and all third-party watch apps must be based on an iphone's host app. We can observe by creating a watch application, first, although support watch development after Xcode6.3, but watch simulator is not very good, Xcode7 is optimized, through the simulator, basically can complete our development. Create a new project with Xcode, and then we'll build a target in the Xcode menu:

Select an item in Apple Watch:

In the following settings, we will first check the include notification and include glance, they are also a way of expression of watch application, we say:

As you can see, there are a few more folders in our project:

We only need to pay attention to the end of the extension and the app of these two, from the directory structure we can also see, the App folder has storyboard this file, extension folder is mainly some code files, this is what we need to understand the Watch app mechanism , the actual run with our watch is the interface in the app folder, and the logic of the code is actually running on our phone, as an extension of the iphone app exists, through the phone and watch interaction, to achieve some of the watch on the operation.

Thus, we can understand that the current third-party watch application, watch is similar to a UI container, through the interaction with the iphone to achieve some logic and effect.

2, three kinds of watch application method of Use

when we created the watch extension, we checked two scenes, literally we can understand the same, here plus my understanding, not the official explanation:

Watch App:watch app's main body, can be accessed through the icon on Watch, can interact with the iphone and data sharing.

Notification:watch notifications, which will be synchronized with iphone notifications, both local and remote, here and the iphone differ in the difference between long notice and short notice, in actual development we can differentiate by adding parameters in the background. The interface in storyboard is as follows:


Glance: Preview interface, no complex interactive ability, can not swipe, only in single display some data, click will enter the main watchapp:

3. Run a watch app on the simulator

Select Our Watch app project and run the following in Xcode7:

If you are a previous version of Xcode, you may need to call it out in the emulator's hardware.

After running, we can use command+h on the Watch simulator to return to watch's main screen.

three, some watch app development idea

1, excellent Watch app must be simple, plain, fast and time-lapse.

2. Watch cannot customize gestures, we can use only swipe, tap and long press

3, must change the idea of the iphone layout, fully accept the new Watch layout features, innovation

4, the iphone is characterized by a beautiful interface, watch is simple





Introduction of AppleWatch Development and application framework of--watch

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.