20
Presented By :- Neha Gupta, Mindfire Solutions Date :- 11th June 2015 Watch-Kit Development (iWatch)

Get started with watch kit development

Embed Size (px)

Citation preview

Page 1: Get started with watch kit development

Presented By :- Neha Gupta, Mindfire Solutions Date :- 11th June 2015

Watch-Kit Development(iWatch)

Page 2: Get started with watch kit development

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

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

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

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

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

App Target Structure

Page 8: Get started with watch kit development

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

Watch Kit App Life Cycle

Page 10: Get started with watch kit development

Life Cycle of Interface Controller

Page 11: Get started with watch kit development

Methods of Interface Controller

init

awakeWithContext:

willActivate

didActivate

Page 12: Get started with watch kit development

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

Apple Watch UI Controls

Text and Labels

Button

Images

Tables

Context Menus

Groups

Date

NSTimer

Page 14: Get started with watch kit development

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

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

Demo of layout implementation using Groups, button and images, table and

menus

Page 17: Get started with watch kit development

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

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

Questions ?

Page 20: Get started with watch kit development

Thank You