Fighting for Apple Watch-----(beginner)

Source: Internet
Author: User
Tags custom graphics home screen

Important

This document is a preliminary document of the API or technology used in the development process. Apple provides the documentation to make it easier for developers to use technology and programming interfaces on Apple products. Later, the information in this document is subject to change, so software developed under this document should be tested using the final operating system software. A new version of the document will further provide a beta version of the API or technology.

Apple Watch provides users with a private, unobtrusive way to access information. Users glance at Apple Watch to get a lot of important news without having to pull their iphone out of their pocket. Apple Watch-only applications should provide the most relevant information in the most direct way possible to simplify interaction.

The normal operation of Apple watch requires the iphone to run related third-party apps. Creating a third-party app requires two different executables: Watch apps running on Apple Watch, and WatchKit app extensions that run on your iphone. The Watch app contains only storyboards and resource files related to the user interface of the application. The WatchKit app extension includes a user interface for managing, listening to, and code that responds to user interaction. With these two executable programs, you can run different types of user interfaces on Apple Watch:

·  The Watch app has a complete user interface for iOS apps. The user launches the Watch app from the main interface to view or manipulate the data.

·  Use the Glance interface to display instant, relevant information on the Watch app, which is an optional read-only interface. Not all watch apps need to use the glance interface, but if you use it, it makes it easy for users to access the data of the iOS app.

·  The custom notification interface allows you to modify the default local or remote notification interface and to add custom graphics, content, and formatting. The custom notification interface is optional.

The Watch app needs to achieve all the interaction that Apple Watch provides as much as possible. Because the Watch app is designed to extend the capabilities of iOS apps, watch apps and WatchKit app extensions will be bundled and packaged into an iOS app package. If the user has Apple Watch paired with an iOS device, the user will be prompted to install the Watch app as the iOS app installs.

Create Watch App

The Watch app is the subject of interaction on Apple Watch. Watch apps are typically accessed from the home screen of Apple Watch and are able to provide a subset of the features associated with iOS apps. The Watch app is designed to allow users to quickly navigate through relevant data.

The Watch app works in conjunction with the WatchKit app extension running on the iphone, which does not contain any custom code, but simply stores the storyboard and the resource files associated with the user interface. WatchKit application extensions are at the heart of these operations. It contains the page logic and the code to manage the content, implement user action responses, and refresh the user interface. Because app extensions run on the user's iphone, it's easy to work with iOS apps, such as collecting coordinate locations or performing other long-running tasks.

To start creating the Watch app, see: App Essential

Creating the Glance Interface

Glance is a dense interface that showcases instant, important information. The content in glance should be concise, because its purpose is to allow users to quickly view messages. Glance does not support scrolling, so the entire glance interface can only be displayed on a single interface, and you need to ensure that it has the right size. Glance only allows read-only, so it cannot contain buttons, switches, or other interactive actions. Clicking Glance will launch your watch app directly.

You need to add code to manage glance in the WatchKit app extension. The class used to manage the Glance interface is the same class as the Watch app. Nonetheless, it is clear that glance is easier to implement because it does not need to respond to user interaction.

To start creating the Glance interface See: Glance Essentials

Customizing the Notification interface

Apple Watch can work with the paired iphone to show local or remote notifications. Apple Watch first uses a small window to display incoming notifications. When the user moves the wrist and wants to see more information, the small window will display more detailed notification content. The app can provide a customized version of the detail interface and can add custom images or change the system's default notification information.

Apple Watch supports interactive notifications that are introduced in iOS 8. Interactive notifications Let the user respond immediately by adding a button to the notification. For example, a calendar time notification may contain a button that receives or rejects a meeting invitation. As long as your iOS app supports interactive notifications, Apple Watch will add the appropriate buttons to your custom or default notification interface. All you need to do is handle these events in the WatchKit application extension.

To create a custom notification interface, see: Notification Essentials.

Fighting for Apple Watch-----(beginner)

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.