SlideShare a Scribd company logo
WatchKit API
BJIT Ltd.
Updated by: Md Saidul Islam Ziku
December 29, 2015
Contents
Apple watch application Introductory
Native Applications
WatchKit Applications
Watch App Architecture
Way to launch an app
Watch App Life Cycle
WatchKit Anatomy
WKInterfaceController LifeCycle
Recap
Apple watch application Introductory
Apple Watch applications are,
- Watch Kit applications
- Native Apple Watch applications
The main difference is the application
architecture.
Native Applications
• Native applications will be able to run without
an extension running on a paired iPhone.
• Haven’t introduced yet.
WatchKit Applications
• WatchKit application
completely relies on the
WatchKit Framework.
• The WatchKit application
runs on the Apple Watch
and is in charge of two
things:
① presenting the user
interface
② responding to user
interaction
Watch App Architecture
• Interactions with app on Apple
Watch lead to the launching of
WatchKit extension on the
appropriate device.
• The Watch app and WatchKit
extension then work together to
run the interface until the user
stops interacting with it.
• Watch app and WatchKit pass
information back and forth until
the user stops interacting with
the app.
Way to launch an app
• By tapping on Home
Screen icon.
Way to launch an app(Cont.)
• By tapping on Glances.
Way to launch an app(Cont.)
• By tapping on
Notifications.
Watch App Life Cycle
• WatchKit automatically loads the
storyboard scene that is
appropriate for the current
interaction.
• WKExtensionDelegate will call for
the corresponding
WKInterfaceController Objcets.
• WatchKit asks the WatchKit
extension to create the
corresponding interface
controller object.
Watch App Life Cycle(cont.)
• Very Similar to iOS app UIApplicationDelegate, a WKExtensionDelegate would
responsible for the watch app target.
• Three Basic Delegate method for WKExtensionDelegate
① - (void)applicationDidFinishLaunching
 Called Once on Lunch
 Perform app initialization
 Setup notifications objervers
 Not yet been active
② - (void)applicationDidBecomeActive
 Each time app become visually active
 Update any states
③ - (void)applicationWillResignActive
 Prepare to be inactive
 Call before going to background
 Disable running service, timers etc
WatchKit Anatomy
• Watch app contains a minimized user
interface and features of the main
application.
– WKInterfaceController
• Notification views are used to handle
push or local notifications of the
application.
– WKUserNotificationInterfaceController
• A glance is another optional
interface. It should provide the most
relevant data for app users.
– WKInterfaceController
• Complication is related for data
source.
– CLKComplicationDataSource
Interface
Resources
Watch
App
Code
Resources
Watch
App
Extension
WKInterfaceController LifeCycle
WKInterfaceController has three
important lifecycle methods:
• - awakeWithContext
– to prepare the controller for use.
– The context object is provided by the
previous controller to exchange the
data.
– If it is the root view controller, the
context object will be nil.
• - willActive
– to notify that interface is onscreen.
– It’s similar to viewDidLoad.
• - didDeactivate
– for cleaning app the controller
– when the interface is no longer
onscreen.
– didDeactivate is similar to overriding
dealloc.
Recap
• So far this session we’ve covered the very
basics of WatchKit application development.
• We’ve covered the watch app lifecycle.
• Also covered the WKinterfaceController
lifecycle with a simple example project.

More Related Content

What's hot

Getting Started with Developing for the Apple Watch
Getting Started with Developing for the Apple WatchGetting Started with Developing for the Apple Watch
Getting Started with Developing for the Apple Watch
Murtza Manzur
 
Getting Started With Developing For Apple Watch
Getting Started With Developing For Apple WatchGetting Started With Developing For Apple Watch
Getting Started With Developing For Apple Watch
InMobi
 
Managing Mobile Apps: A PhoneGap Enterprise Introduction for Marketers
Managing Mobile Apps: A PhoneGap Enterprise Introduction for MarketersManaging Mobile Apps: A PhoneGap Enterprise Introduction for Marketers
Managing Mobile Apps: A PhoneGap Enterprise Introduction for Marketers
arumsey
 
Fast integrations for Fun and Profit
Fast integrations for Fun and ProfitFast integrations for Fun and Profit
Fast integrations for Fun and Profit
Marsh Gardiner
 
Microsoft’s HockeyApp - Mobile Application Testing Tool
Microsoft’s HockeyApp - Mobile Application Testing ToolMicrosoft’s HockeyApp - Mobile Application Testing Tool
Microsoft’s HockeyApp - Mobile Application Testing Tool
sara stanford
 
Preso #5 mvp2 results
Preso #5 mvp2 resultsPreso #5 mvp2 results
Preso #5 mvp2 results
Reilly Wong
 
Manage Your Existing Mobile Apps with AEM Mobile
Manage Your Existing Mobile Apps with AEM MobileManage Your Existing Mobile Apps with AEM Mobile
Manage Your Existing Mobile Apps with AEM Mobile
arumsey
 
iHale Milestone 2 Kickoff
iHale Milestone 2 KickoffiHale Milestone 2 Kickoff
iHale Milestone 2 Kickoff
Philip Johnson
 
Google analytics for iOS
Google analytics for iOSGoogle analytics for iOS
Google analytics for iOS
Pawan Ramteke
 
Connecting your android application to cloud.
Connecting your android application to cloud.Connecting your android application to cloud.
Connecting your android application to cloud.
Eng Chrispinus Onyancha
 
App indexing api
App indexing apiApp indexing api
App indexing api
Mohammad Tarek
 
API Services: Building Apps That Stand Out
API Services: Building Apps That Stand OutAPI Services: Building Apps That Stand Out
API Services: Building Apps That Stand Out
Apigee | Google Cloud
 
adaptTo() 2014 - Mobile app dev with Cordova, Sling, and AEM
adaptTo() 2014 - Mobile app dev with Cordova, Sling, and AEMadaptTo() 2014 - Mobile app dev with Cordova, Sling, and AEM
adaptTo() 2014 - Mobile app dev with Cordova, Sling, and AEM
rbl002
 
Tips and Tricks for new async web client capabilities on model driven apps
Tips and Tricks for new async web client capabilities on model driven appsTips and Tricks for new async web client capabilities on model driven apps
Tips and Tricks for new async web client capabilities on model driven apps
Mehdi El Amri
 
03 02 - tizen app development with visual studio mobile center and team services
03 02 - tizen app development with visual studio mobile center and team services03 02 - tizen app development with visual studio mobile center and team services
03 02 - tizen app development with visual studio mobile center and team services
Alexey Shulga
 
API Observability with LOGIQ.AI
API Observability with LOGIQ.AIAPI Observability with LOGIQ.AI
API Observability with LOGIQ.AI
Andrew Rabindra
 
Recap of the google io 2017
Recap of the google io 2017Recap of the google io 2017
Recap of the google io 2017
Karan Trehan
 
Beyond the Twelve-Factor App
Beyond the Twelve-Factor AppBeyond the Twelve-Factor App
Beyond the Twelve-Factor App
Kazuya Takahashi
 
Clean india API
Clean india APIClean india API
Clean india API
Kapil Pendse
 

What's hot (19)

Getting Started with Developing for the Apple Watch
Getting Started with Developing for the Apple WatchGetting Started with Developing for the Apple Watch
Getting Started with Developing for the Apple Watch
 
Getting Started With Developing For Apple Watch
Getting Started With Developing For Apple WatchGetting Started With Developing For Apple Watch
Getting Started With Developing For Apple Watch
 
Managing Mobile Apps: A PhoneGap Enterprise Introduction for Marketers
Managing Mobile Apps: A PhoneGap Enterprise Introduction for MarketersManaging Mobile Apps: A PhoneGap Enterprise Introduction for Marketers
Managing Mobile Apps: A PhoneGap Enterprise Introduction for Marketers
 
Fast integrations for Fun and Profit
Fast integrations for Fun and ProfitFast integrations for Fun and Profit
Fast integrations for Fun and Profit
 
Microsoft’s HockeyApp - Mobile Application Testing Tool
Microsoft’s HockeyApp - Mobile Application Testing ToolMicrosoft’s HockeyApp - Mobile Application Testing Tool
Microsoft’s HockeyApp - Mobile Application Testing Tool
 
Preso #5 mvp2 results
Preso #5 mvp2 resultsPreso #5 mvp2 results
Preso #5 mvp2 results
 
Manage Your Existing Mobile Apps with AEM Mobile
Manage Your Existing Mobile Apps with AEM MobileManage Your Existing Mobile Apps with AEM Mobile
Manage Your Existing Mobile Apps with AEM Mobile
 
iHale Milestone 2 Kickoff
iHale Milestone 2 KickoffiHale Milestone 2 Kickoff
iHale Milestone 2 Kickoff
 
Google analytics for iOS
Google analytics for iOSGoogle analytics for iOS
Google analytics for iOS
 
Connecting your android application to cloud.
Connecting your android application to cloud.Connecting your android application to cloud.
Connecting your android application to cloud.
 
App indexing api
App indexing apiApp indexing api
App indexing api
 
API Services: Building Apps That Stand Out
API Services: Building Apps That Stand OutAPI Services: Building Apps That Stand Out
API Services: Building Apps That Stand Out
 
adaptTo() 2014 - Mobile app dev with Cordova, Sling, and AEM
adaptTo() 2014 - Mobile app dev with Cordova, Sling, and AEMadaptTo() 2014 - Mobile app dev with Cordova, Sling, and AEM
adaptTo() 2014 - Mobile app dev with Cordova, Sling, and AEM
 
Tips and Tricks for new async web client capabilities on model driven apps
Tips and Tricks for new async web client capabilities on model driven appsTips and Tricks for new async web client capabilities on model driven apps
Tips and Tricks for new async web client capabilities on model driven apps
 
03 02 - tizen app development with visual studio mobile center and team services
03 02 - tizen app development with visual studio mobile center and team services03 02 - tizen app development with visual studio mobile center and team services
03 02 - tizen app development with visual studio mobile center and team services
 
API Observability with LOGIQ.AI
API Observability with LOGIQ.AIAPI Observability with LOGIQ.AI
API Observability with LOGIQ.AI
 
Recap of the google io 2017
Recap of the google io 2017Recap of the google io 2017
Recap of the google io 2017
 
Beyond the Twelve-Factor App
Beyond the Twelve-Factor AppBeyond the Twelve-Factor App
Beyond the Twelve-Factor App
 
Clean india API
Clean india APIClean india API
Clean india API
 

Similar to watch_kit_v_1.0

Apple Watch and WatchKit - A Technical Overview
Apple Watch and WatchKit - A Technical OverviewApple Watch and WatchKit - A Technical Overview
Apple Watch and WatchKit - A Technical Overview
Sammy Sunny
 
Apple Watch Kit trainning slide [team iOS - RikkeiSoft]
Apple Watch Kit trainning slide [team iOS - RikkeiSoft]Apple Watch Kit trainning slide [team iOS - RikkeiSoft]
Apple Watch Kit trainning slide [team iOS - RikkeiSoft]
Hoang Ngo Anh
 
Introduction of Xcode
Introduction of XcodeIntroduction of Xcode
Introduction of Xcode
Dhaval Kaneria
 
Workflow automation i phone application for a construction company
Workflow automation i phone application for a construction companyWorkflow automation i phone application for a construction company
Workflow automation i phone application for a construction company
Mike Taylor
 
Create your First Watchkit App
Create your First Watchkit AppCreate your First Watchkit App
Create your First Watchkit App
Pawan Ramteke
 
Get started with watch kit development
Get started with watch kit developmentGet started with watch kit development
Get started with watch kit development
Mindfire Solutions
 
I WATCH DOCUMENTATION
I WATCH DOCUMENTATIONI WATCH DOCUMENTATION
I WATCH DOCUMENTATION
Anurag Reddy
 
Your 1st Apple watch Application
Your 1st Apple watch ApplicationYour 1st Apple watch Application
Your 1st Apple watch Application
Ciklum Ukraine
 
Gathering App Intelligence for your Web, Desktop and Mobile apps
Gathering App Intelligence for your Web, Desktop and Mobile appsGathering App Intelligence for your Web, Desktop and Mobile apps
Gathering App Intelligence for your Web, Desktop and Mobile apps
Abhishek Kant
 
Revue des annonces WWDC2015
Revue des annonces WWDC2015Revue des annonces WWDC2015
Revue des annonces WWDC2015
CocoaHeads France
 
Apple watch
Apple watchApple watch
Apple watch
Alexey Chulochnikov
 
Application for Data Sync Between Different geo Locations
Application for Data Sync Between Different geo LocationsApplication for Data Sync Between Different geo Locations
Application for Data Sync Between Different geo LocationsMike Taylor
 
Iot physical servers and cloud offerings
Iot physical servers and cloud offeringsIot physical servers and cloud offerings
Iot physical servers and cloud offerings
RajanRock3
 
What's new in iOS Push Notifications
What's new in iOS Push NotificationsWhat's new in iOS Push Notifications
What's new in iOS Push Notifications
Prajwal S Prakash
 
In-Flight Infotainment and e-Shopping App | iPad App for shopping
In-Flight Infotainment and e-Shopping App | iPad App for shoppingIn-Flight Infotainment and e-Shopping App | iPad App for shopping
In-Flight Infotainment and e-Shopping App | iPad App for shopping
Mike Taylor
 
WSO2Con EU 2015: Implementing an Open API for Smart Thermostats with WSO2′s A...
WSO2Con EU 2015: Implementing an Open API for Smart Thermostats with WSO2′s A...WSO2Con EU 2015: Implementing an Open API for Smart Thermostats with WSO2′s A...
WSO2Con EU 2015: Implementing an Open API for Smart Thermostats with WSO2′s A...
WSO2
 
Apple Watch Intro
Apple Watch IntroApple Watch Intro
Apple Watch Intro
Mike Bluestein
 
Apple Watch and Xamarin (NoVA Mobile C# Dev Group 4/8/15)
Apple Watch and Xamarin (NoVA Mobile C# Dev Group 4/8/15)Apple Watch and Xamarin (NoVA Mobile C# Dev Group 4/8/15)
Apple Watch and Xamarin (NoVA Mobile C# Dev Group 4/8/15)
Ed Snider
 
Iphone app programming guide
Iphone app programming guideIphone app programming guide
Iphone app programming guide
ClickBank
 

Similar to watch_kit_v_1.0 (20)

Apple Watch and WatchKit - A Technical Overview
Apple Watch and WatchKit - A Technical OverviewApple Watch and WatchKit - A Technical Overview
Apple Watch and WatchKit - A Technical Overview
 
Apple Watch Kit trainning slide [team iOS - RikkeiSoft]
Apple Watch Kit trainning slide [team iOS - RikkeiSoft]Apple Watch Kit trainning slide [team iOS - RikkeiSoft]
Apple Watch Kit trainning slide [team iOS - RikkeiSoft]
 
Introduction of Xcode
Introduction of XcodeIntroduction of Xcode
Introduction of Xcode
 
Workflow automation i phone application for a construction company
Workflow automation i phone application for a construction companyWorkflow automation i phone application for a construction company
Workflow automation i phone application for a construction company
 
Create your First Watchkit App
Create your First Watchkit AppCreate your First Watchkit App
Create your First Watchkit App
 
Get started with watch kit development
Get started with watch kit developmentGet started with watch kit development
Get started with watch kit development
 
I WATCH DOCUMENTATION
I WATCH DOCUMENTATIONI WATCH DOCUMENTATION
I WATCH DOCUMENTATION
 
Your 1st Apple watch Application
Your 1st Apple watch ApplicationYour 1st Apple watch Application
Your 1st Apple watch Application
 
Gathering App Intelligence for your Web, Desktop and Mobile apps
Gathering App Intelligence for your Web, Desktop and Mobile appsGathering App Intelligence for your Web, Desktop and Mobile apps
Gathering App Intelligence for your Web, Desktop and Mobile apps
 
Revue des annonces WWDC2015
Revue des annonces WWDC2015Revue des annonces WWDC2015
Revue des annonces WWDC2015
 
Apple watch
Apple watchApple watch
Apple watch
 
Application for Data Sync Between Different geo Locations
Application for Data Sync Between Different geo LocationsApplication for Data Sync Between Different geo Locations
Application for Data Sync Between Different geo Locations
 
Iot physical servers and cloud offerings
Iot physical servers and cloud offeringsIot physical servers and cloud offerings
Iot physical servers and cloud offerings
 
What's new in iOS Push Notifications
What's new in iOS Push NotificationsWhat's new in iOS Push Notifications
What's new in iOS Push Notifications
 
In-Flight Infotainment and e-Shopping App | iPad App for shopping
In-Flight Infotainment and e-Shopping App | iPad App for shoppingIn-Flight Infotainment and e-Shopping App | iPad App for shopping
In-Flight Infotainment and e-Shopping App | iPad App for shopping
 
Basics 4
Basics   4Basics   4
Basics 4
 
WSO2Con EU 2015: Implementing an Open API for Smart Thermostats with WSO2′s A...
WSO2Con EU 2015: Implementing an Open API for Smart Thermostats with WSO2′s A...WSO2Con EU 2015: Implementing an Open API for Smart Thermostats with WSO2′s A...
WSO2Con EU 2015: Implementing an Open API for Smart Thermostats with WSO2′s A...
 
Apple Watch Intro
Apple Watch IntroApple Watch Intro
Apple Watch Intro
 
Apple Watch and Xamarin (NoVA Mobile C# Dev Group 4/8/15)
Apple Watch and Xamarin (NoVA Mobile C# Dev Group 4/8/15)Apple Watch and Xamarin (NoVA Mobile C# Dev Group 4/8/15)
Apple Watch and Xamarin (NoVA Mobile C# Dev Group 4/8/15)
 
Iphone app programming guide
Iphone app programming guideIphone app programming guide
Iphone app programming guide
 

watch_kit_v_1.0

  • 1. WatchKit API BJIT Ltd. Updated by: Md Saidul Islam Ziku December 29, 2015
  • 2. Contents Apple watch application Introductory Native Applications WatchKit Applications Watch App Architecture Way to launch an app Watch App Life Cycle WatchKit Anatomy WKInterfaceController LifeCycle Recap
  • 3. Apple watch application Introductory Apple Watch applications are, - Watch Kit applications - Native Apple Watch applications The main difference is the application architecture.
  • 4. Native Applications • Native applications will be able to run without an extension running on a paired iPhone. • Haven’t introduced yet.
  • 5. WatchKit Applications • WatchKit application completely relies on the WatchKit Framework. • The WatchKit application runs on the Apple Watch and is in charge of two things: ① presenting the user interface ② responding to user interaction
  • 6. Watch App Architecture • Interactions with app on Apple Watch lead to the launching of WatchKit extension on the appropriate device. • The Watch app and WatchKit extension then work together to run the interface until the user stops interacting with it. • Watch app and WatchKit pass information back and forth until the user stops interacting with the app.
  • 7. Way to launch an app • By tapping on Home Screen icon.
  • 8. Way to launch an app(Cont.) • By tapping on Glances.
  • 9. Way to launch an app(Cont.) • By tapping on Notifications.
  • 10. Watch App Life Cycle • WatchKit automatically loads the storyboard scene that is appropriate for the current interaction. • WKExtensionDelegate will call for the corresponding WKInterfaceController Objcets. • WatchKit asks the WatchKit extension to create the corresponding interface controller object.
  • 11. Watch App Life Cycle(cont.) • Very Similar to iOS app UIApplicationDelegate, a WKExtensionDelegate would responsible for the watch app target. • Three Basic Delegate method for WKExtensionDelegate ① - (void)applicationDidFinishLaunching  Called Once on Lunch  Perform app initialization  Setup notifications objervers  Not yet been active ② - (void)applicationDidBecomeActive  Each time app become visually active  Update any states ③ - (void)applicationWillResignActive  Prepare to be inactive  Call before going to background  Disable running service, timers etc
  • 12. WatchKit Anatomy • Watch app contains a minimized user interface and features of the main application. – WKInterfaceController • Notification views are used to handle push or local notifications of the application. – WKUserNotificationInterfaceController • A glance is another optional interface. It should provide the most relevant data for app users. – WKInterfaceController • Complication is related for data source. – CLKComplicationDataSource Interface Resources Watch App Code Resources Watch App Extension
  • 13. WKInterfaceController LifeCycle WKInterfaceController has three important lifecycle methods: • - awakeWithContext – to prepare the controller for use. – The context object is provided by the previous controller to exchange the data. – If it is the root view controller, the context object will be nil. • - willActive – to notify that interface is onscreen. – It’s similar to viewDidLoad. • - didDeactivate – for cleaning app the controller – when the interface is no longer onscreen. – didDeactivate is similar to overriding dealloc.
  • 14. Recap • So far this session we’ve covered the very basics of WatchKit application development. • We’ve covered the watch app lifecycle. • Also covered the WKinterfaceController lifecycle with a simple example project.