get started with watch kit development
TRANSCRIPT
![Page 1: Get started with watch kit development](https://reader033.vdocuments.net/reader033/viewer/2022052913/55ba5f72bb61eb20198b46cc/html5/thumbnails/1.jpg)
Presented By :- Neha Gupta, Mindfire Solutions Date :- 11th June 2015
Watch-Kit Development(iWatch)
![Page 2: Get started with watch kit development](https://reader033.vdocuments.net/reader033/viewer/2022052913/55ba5f72bb61eb20198b46cc/html5/thumbnails/2.jpg)
Content
Overview of Watch-Kit
Interaction with Apple Watch
Configure Apple Watch into Xcode
App Target Structure
Watch kit App life cycle
Apple Watch UI Controls
Apple Watch Navigation
Passing data b/w interface controllers
![Page 3: Get started with watch kit development](https://reader033.vdocuments.net/reader033/viewer/2022052913/55ba5f72bb61eb20198b46cc/html5/thumbnails/3.jpg)
Overview of WatchKit App
WatchKit is an Apple's new framework to create applications for apple watch.
WatchKit apps are not standalone apps, means these apps need to be paired with iOS App.
Watch App will be an extension of iPhone Apps. The iPhone app is responsible for installing and running watch app.
s
![Page 4: Get started with watch kit development](https://reader033.vdocuments.net/reader033/viewer/2022052913/55ba5f72bb61eb20198b46cc/html5/thumbnails/4.jpg)
Apple Watch Models
Apple has introduced apple watch with two different size, both having retina display.
38mm screen with 272*340 px resolution
42mm screen with 312*390 px resolution
![Page 5: Get started with watch kit development](https://reader033.vdocuments.net/reader033/viewer/2022052913/55ba5f72bb61eb20198b46cc/html5/thumbnails/5.jpg)
Interaction with Apple Watch
Gesture
Force Touch (holding or tapping the screen for few seconds, menu screen will be displayed)
Digital Crown
Side button
![Page 6: Get started with watch kit development](https://reader033.vdocuments.net/reader033/viewer/2022052913/55ba5f72bb61eb20198b46cc/html5/thumbnails/6.jpg)
Configure Apple Watch into Xcode
Steps to add watch kit app target into iOS App :-
In xcode, create a new project for iOS App
Select File>New>Target>Apple Watch Section
Select WatchKit App then click next
Click Finish
![Page 7: Get started with watch kit development](https://reader033.vdocuments.net/reader033/viewer/2022052913/55ba5f72bb61eb20198b46cc/html5/thumbnails/7.jpg)
App Target Structure
![Page 8: Get started with watch kit development](https://reader033.vdocuments.net/reader033/viewer/2022052913/55ba5f72bb61eb20198b46cc/html5/thumbnails/8.jpg)
Build and Run Process
Steps to configure custom build schemes for glance and notification :-
Select existing watch kit app scheme
Now select Edit Scheme
Duplicate existing watch app scheme
Select Run in the left column of scheme editor
In Info Tab, select watch interface
Close the scheme editor to save your changes
![Page 9: Get started with watch kit development](https://reader033.vdocuments.net/reader033/viewer/2022052913/55ba5f72bb61eb20198b46cc/html5/thumbnails/9.jpg)
Watch Kit App Life Cycle
![Page 10: Get started with watch kit development](https://reader033.vdocuments.net/reader033/viewer/2022052913/55ba5f72bb61eb20198b46cc/html5/thumbnails/10.jpg)
Life Cycle of Interface Controller
![Page 11: Get started with watch kit development](https://reader033.vdocuments.net/reader033/viewer/2022052913/55ba5f72bb61eb20198b46cc/html5/thumbnails/11.jpg)
Methods of Interface Controller
init
awakeWithContext:
willActivate
didActivate
![Page 12: Get started with watch kit development](https://reader033.vdocuments.net/reader033/viewer/2022052913/55ba5f72bb61eb20198b46cc/html5/thumbnails/12.jpg)
Apple Watch UI Component
Apple watch provides 3 different ways to create the UI :-
WatchKit Apps
Glances
Notifications
![Page 13: Get started with watch kit development](https://reader033.vdocuments.net/reader033/viewer/2022052913/55ba5f72bb61eb20198b46cc/html5/thumbnails/13.jpg)
Apple Watch UI Controls
Text and Labels
Button
Images
Tables
Context Menus
Groups
Date
NSTimer
![Page 14: Get started with watch kit development](https://reader033.vdocuments.net/reader033/viewer/2022052913/55ba5f72bb61eb20198b46cc/html5/thumbnails/14.jpg)
Apple Watch Navigation
Hierarchical Interface
- pushControllerWithName:context- popController- popToRootController
Page-Based Interface
+ reloadRootControllersWithNames:contexts:- becomeCurrentPage
Present Interface Controller Modally
- presentControllerWithName:context:- presentControllerWithNames:contexts:- dismissController
![Page 15: Get started with watch kit development](https://reader033.vdocuments.net/reader033/viewer/2022052913/55ba5f72bb61eb20198b46cc/html5/thumbnails/15.jpg)
Passing Data between Interface Controllers
By pushing view controller programmatically :-
self.pushControllerWithName("PushData", context: "Data Received by pushing interface controller")
By creating segues :-
override func contextForSegueWithIdentifier(segueIdentifier: String) -> AnyObject? { return "Data Received from Segue" }
![Page 16: Get started with watch kit development](https://reader033.vdocuments.net/reader033/viewer/2022052913/55ba5f72bb61eb20198b46cc/html5/thumbnails/16.jpg)
Demo of layout implementation using Groups, button and images, table and
menus
![Page 17: Get started with watch kit development](https://reader033.vdocuments.net/reader033/viewer/2022052913/55ba5f72bb61eb20198b46cc/html5/thumbnails/17.jpg)
Limitations of Apple Watch
Multi-touch is not supported.
No access to the sensors on the Apple Watch.
Watch App has 20MB image cache, limit cannot be changed.
Watch kit Extensions cannot perform any processing after being deactivated.
![Page 18: Get started with watch kit development](https://reader033.vdocuments.net/reader033/viewer/2022052913/55ba5f72bb61eb20198b46cc/html5/thumbnails/18.jpg)
Reference and Demos Link
https://developer.apple.com/library/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/index.html
http://swiftiostutorials.com/watchkit-tutorial/
http://natashatherobot.com/watchkit-menu/
http://www.kristinathai.com/send-data-to-parent-ios-app/
![Page 19: Get started with watch kit development](https://reader033.vdocuments.net/reader033/viewer/2022052913/55ba5f72bb61eb20198b46cc/html5/thumbnails/19.jpg)
Questions ?
![Page 20: Get started with watch kit development](https://reader033.vdocuments.net/reader033/viewer/2022052913/55ba5f72bb61eb20198b46cc/html5/thumbnails/20.jpg)
Thank You