Apple Watch Development

If you like this presentation – show it...

Slide 0

Apple Watch Development Introduction to Watch Kit Mike Bluestein @mikebluestein

Slide 1

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

Slide 2

2 Watch Sizes 38mm and 42 mm Same aspect ratio

Slide 3

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

Slide 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

Slide 5

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

Slide 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

Slide 7

App Structure Parent iPhone App Watch Extension Watch App Shared Code

Slide 8

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

Slide 9

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

Slide 10

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

Slide 11

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

Slide 12

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

Slide 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

Slide 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

Slide 15

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

Slide 16

Communication App groups OpenParentApplication HandleWatchKitExtensionRequest Darwin notifications

Slide 17

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

Slide 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

Slide 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

Slide 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

Slide 21

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

Slide 22


Slide 23