Apple Watch Development

Понравилась презентация – покажи это...

Слайд 0

Apple Watch Development Introduction to Watch Kit Mike Bluestein @mikebluestein

Слайд 1

Apple Watch Requires an iPhone (5c or above) Connects to watch via BlueTooth golfwatchscorecard.com

Слайд 2

2 Watch Sizes 38mm and 42 mm Same aspect ratio

Слайд 3

Apple Provided Apps Some Apple apps and features work without phone These apps have access to sensor data Full animation capability

Слайд 4

3rd Party Apps Run entirely on iPhone Installed when installed on paired iPhone Watch is for UI presentation layer only Limited SDK - Watch Kit “Full” SDK later this year

Слайд 5

Yes You Can Create simple user interface Present data from the parent iPhone application Present notifications Present glaces Create image-based animations

Слайд 6

No You Can’t Run apps without a connect iPhone Build watch-only apps Capture biometric sensor data Capture motion data Create timing based animations

Слайд 7

App Structure Parent iPhone App Watch Extension Watch App Shared Code

Слайд 8

UI Navigation Two types of UI navigation Page-based Hierarchical Cannot mix them (unless using a modal controller)

Слайд 9

Layout Groups Easy to use Far less complex than auto-layout

Слайд 10

Controls New set of UI controls Designed specifically for Apple Watch Easy to use Not as full-featured as UIKit

Слайд 11

Menus Open with force touch gesture Controls for menu and menu items Handle selection in WKInterfaceController

Слайд 12

Watch App Contains the user interface and static resources Storyboards are required No code runs on the watch

Слайд 13

Watch Extension Runs on the phone Has its own lifecycle Handles user interactions raised from watch app Updates user interface on watch remotely Performs shorter running tasks Access shared data

Слайд 14

iPhone App Parent app to the watch app Performs longer running tasks Access shared data Does not share security Separate process from watch extension

Слайд 15

App Groups Share data between iPhone and Watch Extension Can share files, settings, database Requires shared group entitlement

Слайд 16

Communication App groups OpenParentApplication HandleWatchKitExtensionRequest Darwin notifications

Слайд 17

WormHoleSharp Bridge between iOS app and Watch Extension Pass data or commands github.com/Clancey/WormHoleSharp I’m being controlled from Apple Watch!

Слайд 18

Images SetImage - works with UIImage SetImageData - works directly with bitmap data Both send data from iPhone to Apple Watch SetImageNamed - sends only name to watch Image is loaded from bundle or cache Used to create animation 20 MB cache with simple cache API

Слайд 19

Notifications Local or remote notifications from iPhone Short-look - initial display of notification to user Long-look - displayed after user looks at short look for a few seconds Long-look is scrollable and can have action buttons

Слайд 20

Glances Quick access to brief, relevant information Swipe up from watch face to access Not interactive One glance controller per app Tap glance to open watch app

Слайд 21

App Store Requirements No alpha in images Use 42 mm for screenshots No mention of watch in iPhone app images Other?

Слайд 22


Слайд 23