SlideShare a Scribd company logo
Apple Watch Kit
HoangNA - CuongNT
Team iOS - RikkeiSoft Ltd
05-2015
Introduction
- Watch Kit was introduced in November 2014.
- Apple Watch is just an external display for program running on a connected
iPhone.
- Watch Kit development requires the iOS 8.2 SDK or later.
- Two separate bundles:
+ WatchKit app (runs on Apple Watch)
+ WatchKit extension (runs on user’s iPhone)
Watch Kit Solution
Has 3 projects:
- The Watch Extension: runs on the
connected iPhones, contains the code
and large resource storage for the Watch
App but has no visible representation
beyond what the Watch App provides.
- The Watch App: small project which
runs on the Apple Watch, generally
consisting of only a storyboard, small
resources, and link references to files in
the Watch Extension.
- The iOS Parent App: a project whose
primary purpose is to bundle the Watch
App and Extension.
Application Lifecycle
(1)
- Handle each Storyboard scene by a subclass of WKInterfaceController.
- WKInterfaceController ≈ UIViewController (do not have the same level of access to the view
components).
- Can: + hide and reveal controls
+ change size, transparency, appearance options of some controls
- Can’t: + dynamically add controls
+ restructure UI
Application
Lifecycle (2)
The lifecycle of a WKInterfaceController object involves the
following calls:
• Awake: should perform most of initialization here.
• WillActive: Call shortly before the Watch App appears.
Use this method to perform last-moment initialization,
start animation, etc.
• At this point, the Watch App appears and the Extension
begins responding to user input and updating the Watch
App’s display per application logic.
• DidDeactivate: is called after the Watch App has been
dismissed by the user or the connection to the iPhone is
broken. After this method returns, user interface controls
can’t be modified until the next time WillActive is
called.
• After the Extension has been deactivated, it is
inaccessible to program. Pending asynchronous
functions will not be called.
Types of User Interface
• Normal Interaction: the majority of Watch App/Extension
interaction will be with sub-class of WKInterfaceController (by
custom controllers: LabelDetailController,
ButtonDetailController, SwitchDetailController, etc.)
• Glances: non-interactive, single-page UIs that are intended to
provide summary or crucial data.
• Notifications: are a major user-case for the Apple Watch. Both
local and remote notifications are supported.
User Interface: Normal Interaction
User Interface: Glances
When a Glance is tapped, it
launches the main Watch App.
Glances may deep-link into the
Watch App by passing context
info in a call to
WKInterfaceController.Upd
ateUserActivity.
User Interface: Notifications
- Occurs in two stages: Short Locks and Long Lock
• Short Locks: displayed briefly and show the Watch App icon, its name and the Title.
• Long Lock: combines a system provided sash area and Dismiss button with custom
Storyboard-based content.
- React to notification event by overriding two methods
DidReceiveLocalNotification and DidReceiveRemoteNotification
Screen Sizes
The Apple Watch has two face sizes: 38mm & 42mm, both are 5:4 display ratio, Retina screen.
• 38mm: 136 x 170 logical pixels ( 272 x 340 physical pixels)
• 42mm: 156 x 195 logical pixels (312 x 390 physical pixels)
Use WKInterfaceDevice.ScreenBounds to determine on which display Watch App is running.
(*): Should develop text and layout design with 38mm display then scale up because scaling
down from large environment may lead to ugly overlap or text truncation.
Limit of Watch Kit
• No access to the sensors on the Apple Watch.
• The App/Extension will not run without an active connection to an iPhone. Notifications will
not appear on a disconnected Watch.
• The Watch App has a 20Mb image cache
(WKInterfaceDevice.CurrentDevice.AddCachedImage,
WKInterfaceDevice.CurrentDevice.WeakCachedImages). This limit can’t be
changed and developers must manage the cache contents themselves.
• Different classes ( WKInterfaceButton vs UIButton, WKInterfaceSwitch vs
UISwitch, etc) and have a limited set of methods compared to their UIKit equivalents.
• No access to the display graphic context on the Watch.
• Apple will not allow 3rd-party custom watch faces.
• Doesn’t support background execution. Any pending asynchronous functions will not
execute after Watch Kit Extensions are being deactivated.
• Can’t play sound on the Apple Watch.
• No access to the Taptic (Vibration) API.
• Cannot route notifications to the Watch only or the iPhone only.
References
• https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/Watch
KitProgrammingGuide/index.html
• https://developer.apple.com/watch/human-interface-guidelines/
• http://www.raywenderlich.com/89562/watchkit-tutorial-with-swift-getting-started
• http://developer.xamarin.com/guides/ios/watch/intro-to-watchkit/

More Related Content

What's hot

Why you should care about Progressive Web Apps?
Why you should care about Progressive Web Apps?Why you should care about Progressive Web Apps?
Why you should care about Progressive Web Apps?
Vytas Dargis
 
How to make money with the Windows Store
How to make money with the Windows StoreHow to make money with the Windows Store
How to make money with the Windows Store
Microsoft Schweiz
 
Apple Watch
Apple WatchApple Watch
Apple Watch
NSCoder Mexico
 
Monkey runner & Monkey testing
Monkey runner & Monkey testingMonkey runner & Monkey testing
Monkey runner & Monkey testing
SWAAM Tech
 
Mobile Application Test automation using MonkeyTalk Tool
Mobile Application Test automation using MonkeyTalk ToolMobile Application Test automation using MonkeyTalk Tool
Mobile Application Test automation using MonkeyTalk Tool
Vivek Pansara
 
Testando Sua App Android na Nuvem
Testando Sua App Android na NuvemTestando Sua App Android na Nuvem
Testando Sua App Android na Nuvem
Eduardo Carrara de Araujo
 
Monkey talk
Monkey talkMonkey talk
Monkey talkISsoft
 
Google Maps API for Android
Google Maps API for AndroidGoogle Maps API for Android
Google Maps API for Android
Maksim Golivkin
 
MonkeyTalk Documentation
MonkeyTalk DocumentationMonkeyTalk Documentation
MonkeyTalk Documentation
Vivek Pansara
 
8 steps to create a mobile app
8 steps to create a mobile app8 steps to create a mobile app
8 steps to create a mobile app
nas nazar
 
Network one
Network oneNetwork one
Network one
Lex Kimbrow
 
Push notifications on Nokia X
Push notifications on Nokia XPush notifications on Nokia X
Push notifications on Nokia X
Microsoft Mobile Developer
 
I phone hig ~to be or not to be~
I phone hig ~to be or not to be~I phone hig ~to be or not to be~
I phone hig ~to be or not to be~Neha Thakur
 
Introduction to Mobile Apps
Introduction to Mobile Apps Introduction to Mobile Apps
Introduction to Mobile Apps
Shahryar Khan
 
Android Oreo - An Introduction
Android Oreo - An Introduction Android Oreo - An Introduction
Android Oreo - An Introduction
Somo
 
Android marshmallow 6.0
Android marshmallow 6.0Android marshmallow 6.0
Android marshmallow 6.0
Parmeshwar Wahatule
 
Generic test plan
Generic test planGeneric test plan
Generic test plan
Pooja Dutt
 
MonkeyTalk Automation Testing For Android Application
MonkeyTalk Automation Testing For Android ApplicationMonkeyTalk Automation Testing For Android Application
MonkeyTalk Automation Testing For Android Application
ContusQA
 

What's hot (19)

Why you should care about Progressive Web Apps?
Why you should care about Progressive Web Apps?Why you should care about Progressive Web Apps?
Why you should care about Progressive Web Apps?
 
How to make money with the Windows Store
How to make money with the Windows StoreHow to make money with the Windows Store
How to make money with the Windows Store
 
Apple Watch
Apple WatchApple Watch
Apple Watch
 
Monkey runner & Monkey testing
Monkey runner & Monkey testingMonkey runner & Monkey testing
Monkey runner & Monkey testing
 
Mobile Application Test automation using MonkeyTalk Tool
Mobile Application Test automation using MonkeyTalk ToolMobile Application Test automation using MonkeyTalk Tool
Mobile Application Test automation using MonkeyTalk Tool
 
Testando Sua App Android na Nuvem
Testando Sua App Android na NuvemTestando Sua App Android na Nuvem
Testando Sua App Android na Nuvem
 
Monkey talk
Monkey talkMonkey talk
Monkey talk
 
Google Maps API for Android
Google Maps API for AndroidGoogle Maps API for Android
Google Maps API for Android
 
MonkeyTalk Documentation
MonkeyTalk DocumentationMonkeyTalk Documentation
MonkeyTalk Documentation
 
8 steps to create a mobile app
8 steps to create a mobile app8 steps to create a mobile app
8 steps to create a mobile app
 
Network one
Network oneNetwork one
Network one
 
Push notifications on Nokia X
Push notifications on Nokia XPush notifications on Nokia X
Push notifications on Nokia X
 
I phone hig ~to be or not to be~
I phone hig ~to be or not to be~I phone hig ~to be or not to be~
I phone hig ~to be or not to be~
 
Introduction to Mobile Apps
Introduction to Mobile Apps Introduction to Mobile Apps
Introduction to Mobile Apps
 
Android Oreo - An Introduction
Android Oreo - An Introduction Android Oreo - An Introduction
Android Oreo - An Introduction
 
Android marshmallow 6.0
Android marshmallow 6.0Android marshmallow 6.0
Android marshmallow 6.0
 
Monkey talk
Monkey talkMonkey talk
Monkey talk
 
Generic test plan
Generic test planGeneric test plan
Generic test plan
 
MonkeyTalk Automation Testing For Android Application
MonkeyTalk Automation Testing For Android ApplicationMonkeyTalk Automation Testing For Android Application
MonkeyTalk Automation Testing For Android Application
 

Similar to Apple Watch Kit trainning slide [team iOS - RikkeiSoft]

WatchOS Architecture
WatchOS ArchitectureWatchOS Architecture
WatchOS Architecture
Avinash Gautam
 
Apple Watch: Everything You Need To Know As A Marketer
Apple Watch: Everything You Need To Know As A MarketerApple Watch: Everything You Need To Know As A Marketer
Apple Watch: Everything You Need To Know As A Marketer
Inlight
 
I WATCH DOCUMENTATION
I WATCH DOCUMENTATIONI WATCH DOCUMENTATION
I WATCH DOCUMENTATION
Anurag Reddy
 
Introduction of Xcode
Introduction of XcodeIntroduction of Xcode
Introduction of Xcode
Dhaval Kaneria
 
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
 
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
 
Session 16 - Designing universal interface which used for iPad and iPhone
Session 16  -  Designing universal interface which used for iPad and iPhoneSession 16  -  Designing universal interface which used for iPad and iPhone
Session 16 - Designing universal interface which used for iPad and iPhoneVu Tran Lam
 
What’s New in iOS 8 SDK ?
What’s New in iOS 8 SDK ?What’s New in iOS 8 SDK ?
What’s New in iOS 8 SDK ?
E2LOGY
 
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
 
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
 
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
 
Embedded Systems.pdf
Embedded Systems.pdfEmbedded Systems.pdf
Embedded Systems.pdf
ruvabebe
 
[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Android[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Android
rizki adam kurniawan
 
DF14: Drive Salesforce User Productivity with the Pebble SmartWatch
DF14: Drive Salesforce User Productivity with the Pebble SmartWatchDF14: Drive Salesforce User Productivity with the Pebble SmartWatch
DF14: Drive Salesforce User Productivity with the Pebble SmartWatch
jayvinarora
 
Build Apps for Apple Watch - Francesco Novelli - Codemotion Milan 2016
Build Apps for Apple Watch - Francesco Novelli - Codemotion Milan 2016Build Apps for Apple Watch - Francesco Novelli - Codemotion Milan 2016
Build Apps for Apple Watch - Francesco Novelli - Codemotion Milan 2016
Codemotion
 
Create your First Watchkit App
Create your First Watchkit AppCreate your First Watchkit App
Create your First Watchkit App
Pawan Ramteke
 
[CocoaHeads Tricity] watchOS 2 - native apps are coming
[CocoaHeads Tricity] watchOS 2 - native apps are coming[CocoaHeads Tricity] watchOS 2 - native apps are coming
[CocoaHeads Tricity] watchOS 2 - native apps are coming
Mateusz Klimczak
 
Components in Ionic Presentation (FrontEnd)
Components in Ionic Presentation (FrontEnd)Components in Ionic Presentation (FrontEnd)
Components in Ionic Presentation (FrontEnd)
Knoldus Inc.
 

Similar to Apple Watch Kit trainning slide [team iOS - RikkeiSoft] (20)

WatchOS Architecture
WatchOS ArchitectureWatchOS Architecture
WatchOS Architecture
 
watch_kit_v_1.0
watch_kit_v_1.0watch_kit_v_1.0
watch_kit_v_1.0
 
Apple Watch: Everything You Need To Know As A Marketer
Apple Watch: Everything You Need To Know As A MarketerApple Watch: Everything You Need To Know As A Marketer
Apple Watch: Everything You Need To Know As A Marketer
 
I WATCH DOCUMENTATION
I WATCH DOCUMENTATIONI WATCH DOCUMENTATION
I WATCH DOCUMENTATION
 
Introduction of Xcode
Introduction of XcodeIntroduction of Xcode
Introduction of Xcode
 
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)
 
Get started with watch kit development
Get started with watch kit developmentGet started with watch kit development
Get started with watch kit development
 
Session 16 - Designing universal interface which used for iPad and iPhone
Session 16  -  Designing universal interface which used for iPad and iPhoneSession 16  -  Designing universal interface which used for iPad and iPhone
Session 16 - Designing universal interface which used for iPad and iPhone
 
AppleWatch_Presentation
AppleWatch_PresentationAppleWatch_Presentation
AppleWatch_Presentation
 
What’s New in iOS 8 SDK ?
What’s New in iOS 8 SDK ?What’s New in iOS 8 SDK ?
What’s New in iOS 8 SDK ?
 
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
 
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
 
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
 
Embedded Systems.pdf
Embedded Systems.pdfEmbedded Systems.pdf
Embedded Systems.pdf
 
[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Android[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Android
 
DF14: Drive Salesforce User Productivity with the Pebble SmartWatch
DF14: Drive Salesforce User Productivity with the Pebble SmartWatchDF14: Drive Salesforce User Productivity with the Pebble SmartWatch
DF14: Drive Salesforce User Productivity with the Pebble SmartWatch
 
Build Apps for Apple Watch - Francesco Novelli - Codemotion Milan 2016
Build Apps for Apple Watch - Francesco Novelli - Codemotion Milan 2016Build Apps for Apple Watch - Francesco Novelli - Codemotion Milan 2016
Build Apps for Apple Watch - Francesco Novelli - Codemotion Milan 2016
 
Create your First Watchkit App
Create your First Watchkit AppCreate your First Watchkit App
Create your First Watchkit App
 
[CocoaHeads Tricity] watchOS 2 - native apps are coming
[CocoaHeads Tricity] watchOS 2 - native apps are coming[CocoaHeads Tricity] watchOS 2 - native apps are coming
[CocoaHeads Tricity] watchOS 2 - native apps are coming
 
Components in Ionic Presentation (FrontEnd)
Components in Ionic Presentation (FrontEnd)Components in Ionic Presentation (FrontEnd)
Components in Ionic Presentation (FrontEnd)
 

Recently uploaded

Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 

Recently uploaded (20)

Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 

Apple Watch Kit trainning slide [team iOS - RikkeiSoft]

  • 1. Apple Watch Kit HoangNA - CuongNT Team iOS - RikkeiSoft Ltd 05-2015
  • 2. Introduction - Watch Kit was introduced in November 2014. - Apple Watch is just an external display for program running on a connected iPhone. - Watch Kit development requires the iOS 8.2 SDK or later. - Two separate bundles: + WatchKit app (runs on Apple Watch) + WatchKit extension (runs on user’s iPhone)
  • 3. Watch Kit Solution Has 3 projects: - The Watch Extension: runs on the connected iPhones, contains the code and large resource storage for the Watch App but has no visible representation beyond what the Watch App provides. - The Watch App: small project which runs on the Apple Watch, generally consisting of only a storyboard, small resources, and link references to files in the Watch Extension. - The iOS Parent App: a project whose primary purpose is to bundle the Watch App and Extension.
  • 4. Application Lifecycle (1) - Handle each Storyboard scene by a subclass of WKInterfaceController. - WKInterfaceController ≈ UIViewController (do not have the same level of access to the view components). - Can: + hide and reveal controls + change size, transparency, appearance options of some controls - Can’t: + dynamically add controls + restructure UI
  • 5. Application Lifecycle (2) The lifecycle of a WKInterfaceController object involves the following calls: • Awake: should perform most of initialization here. • WillActive: Call shortly before the Watch App appears. Use this method to perform last-moment initialization, start animation, etc. • At this point, the Watch App appears and the Extension begins responding to user input and updating the Watch App’s display per application logic. • DidDeactivate: is called after the Watch App has been dismissed by the user or the connection to the iPhone is broken. After this method returns, user interface controls can’t be modified until the next time WillActive is called. • After the Extension has been deactivated, it is inaccessible to program. Pending asynchronous functions will not be called.
  • 6. Types of User Interface • Normal Interaction: the majority of Watch App/Extension interaction will be with sub-class of WKInterfaceController (by custom controllers: LabelDetailController, ButtonDetailController, SwitchDetailController, etc.) • Glances: non-interactive, single-page UIs that are intended to provide summary or crucial data. • Notifications: are a major user-case for the Apple Watch. Both local and remote notifications are supported.
  • 8. User Interface: Glances When a Glance is tapped, it launches the main Watch App. Glances may deep-link into the Watch App by passing context info in a call to WKInterfaceController.Upd ateUserActivity.
  • 9. User Interface: Notifications - Occurs in two stages: Short Locks and Long Lock • Short Locks: displayed briefly and show the Watch App icon, its name and the Title. • Long Lock: combines a system provided sash area and Dismiss button with custom Storyboard-based content. - React to notification event by overriding two methods DidReceiveLocalNotification and DidReceiveRemoteNotification
  • 10. Screen Sizes The Apple Watch has two face sizes: 38mm & 42mm, both are 5:4 display ratio, Retina screen. • 38mm: 136 x 170 logical pixels ( 272 x 340 physical pixels) • 42mm: 156 x 195 logical pixels (312 x 390 physical pixels) Use WKInterfaceDevice.ScreenBounds to determine on which display Watch App is running. (*): Should develop text and layout design with 38mm display then scale up because scaling down from large environment may lead to ugly overlap or text truncation.
  • 11. Limit of Watch Kit • No access to the sensors on the Apple Watch. • The App/Extension will not run without an active connection to an iPhone. Notifications will not appear on a disconnected Watch. • The Watch App has a 20Mb image cache (WKInterfaceDevice.CurrentDevice.AddCachedImage, WKInterfaceDevice.CurrentDevice.WeakCachedImages). This limit can’t be changed and developers must manage the cache contents themselves. • Different classes ( WKInterfaceButton vs UIButton, WKInterfaceSwitch vs UISwitch, etc) and have a limited set of methods compared to their UIKit equivalents. • No access to the display graphic context on the Watch. • Apple will not allow 3rd-party custom watch faces. • Doesn’t support background execution. Any pending asynchronous functions will not execute after Watch Kit Extensions are being deactivated. • Can’t play sound on the Apple Watch. • No access to the Taptic (Vibration) API. • Cannot route notifications to the Watch only or the iPhone only.
  • 12. References • https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/Watch KitProgrammingGuide/index.html • https://developer.apple.com/watch/human-interface-guidelines/ • http://www.raywenderlich.com/89562/watchkit-tutorial-with-swift-getting-started • http://developer.xamarin.com/guides/ios/watch/intro-to-watchkit/