Apple Watch Kit trainning slide [team iOS - RikkeiSoft]

Hoang Ngo Anh
Hoang Ngo AnhiOS Developer um RikkeiSoft
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/
1 von 12

Recomendados

Intro to MonoTouch von
Intro to MonoTouchIntro to MonoTouch
Intro to MonoTouchmikebluestein
2.5K views9 Folien
Apple Watch Intro von
Apple Watch IntroApple Watch Intro
Apple Watch IntroMike Bluestein
19.2K views24 Folien
Apple Watch and WatchKit - A Technical Overview von
Apple Watch and WatchKit - A Technical OverviewApple Watch and WatchKit - A Technical Overview
Apple Watch and WatchKit - A Technical OverviewSammy Sunny
1.1K views39 Folien
Apple Watch - Getting Started von
Apple Watch - Getting StartedApple Watch - Getting Started
Apple Watch - Getting Startedintive
32.4K views15 Folien
Android 6.0 Marshmallow - Everything you need to know ! von
Android 6.0 Marshmallow - Everything you need to know !Android 6.0 Marshmallow - Everything you need to know !
Android 6.0 Marshmallow - Everything you need to know !Edureka!
1.1K views15 Folien
Build apps for Apple Watch von
Build apps for Apple WatchBuild apps for Apple Watch
Build apps for Apple WatchFrancesco Novelli
275 views54 Folien

Más contenido relacionado

Was ist angesagt?

Why you should care about Progressive Web Apps? von
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
642 views14 Folien
How to make money with the Windows Store von
How to make money with the Windows StoreHow to make money with the Windows Store
How to make money with the Windows StoreMicrosoft Schweiz
1.3K views53 Folien
Apple Watch von
Apple WatchApple Watch
Apple WatchNSCoder Mexico
370 views29 Folien
Monkey runner & Monkey testing von
Monkey runner & Monkey testingMonkey runner & Monkey testing
Monkey runner & Monkey testingSWAAM Tech
7.6K views22 Folien
Mobile Application Test automation using MonkeyTalk Tool von
Mobile Application Test automation using MonkeyTalk ToolMobile Application Test automation using MonkeyTalk Tool
Mobile Application Test automation using MonkeyTalk ToolVivek Pansara
2.7K views11 Folien
Testando Sua App Android na Nuvem von
Testando Sua App Android na NuvemTestando Sua App Android na Nuvem
Testando Sua App Android na NuvemEduardo Carrara de Araujo
1.2K views27 Folien

Was ist angesagt?(19)

Why you should care about Progressive Web Apps? von Vytas Dargis
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 Dargis642 views
How to make money with the Windows Store von Microsoft Schweiz
How to make money with the Windows StoreHow to make money with the Windows Store
How to make money with the Windows Store
Microsoft Schweiz1.3K views
Monkey runner & Monkey testing von SWAAM Tech
Monkey runner & Monkey testingMonkey runner & Monkey testing
Monkey runner & Monkey testing
SWAAM Tech7.6K views
Mobile Application Test automation using MonkeyTalk Tool von Vivek Pansara
Mobile Application Test automation using MonkeyTalk ToolMobile Application Test automation using MonkeyTalk Tool
Mobile Application Test automation using MonkeyTalk Tool
Vivek Pansara2.7K views
Monkey talk von ISsoft
Monkey talkMonkey talk
Monkey talk
ISsoft4.3K views
MonkeyTalk Documentation von Vivek Pansara
MonkeyTalk DocumentationMonkeyTalk Documentation
MonkeyTalk Documentation
Vivek Pansara4.2K views
8 steps to create a mobile app von nas nazar
8 steps to create a mobile app8 steps to create a mobile app
8 steps to create a mobile app
nas nazar193 views
I phone hig ~to be or not to be~ von Neha Thakur
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 Thakur224 views
Introduction to Mobile Apps von Shahryar Khan
Introduction to Mobile Apps Introduction to Mobile Apps
Introduction to Mobile Apps
Shahryar Khan316 views
Android Oreo - An Introduction von Somo
Android Oreo - An Introduction Android Oreo - An Introduction
Android Oreo - An Introduction
Somo 1.3K views
Generic test plan von Pooja Dutt
Generic test planGeneric test plan
Generic test plan
Pooja Dutt458 views
MonkeyTalk Automation Testing For Android Application von ContusQA
MonkeyTalk Automation Testing For Android ApplicationMonkeyTalk Automation Testing For Android Application
MonkeyTalk Automation Testing For Android Application
ContusQA30.8K views

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

WatchOS Architecture von
WatchOS ArchitectureWatchOS Architecture
WatchOS ArchitectureAvinash Gautam
1.5K views13 Folien
watch_kit_v_1.0 von
watch_kit_v_1.0watch_kit_v_1.0
watch_kit_v_1.0Ziku Spartan
124 views14 Folien
Apple Watch: Everything You Need To Know As A Marketer von
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 MarketerInlight
19.4K views21 Folien
I WATCH DOCUMENTATION von
I WATCH DOCUMENTATIONI WATCH DOCUMENTATION
I WATCH DOCUMENTATIONAnurag Reddy
1.4K views24 Folien
Introduction of Xcode von
Introduction of XcodeIntroduction of Xcode
Introduction of XcodeDhaval Kaneria
5K views39 Folien
Apple Watch and Xamarin (NoVA Mobile C# Dev Group 4/8/15) von
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
550 views17 Folien

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

Apple Watch: Everything You Need To Know As A Marketer von Inlight
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
Inlight19.4K views
I WATCH DOCUMENTATION von Anurag Reddy
I WATCH DOCUMENTATIONI WATCH DOCUMENTATION
I WATCH DOCUMENTATION
Anurag Reddy1.4K views
Apple Watch and Xamarin (NoVA Mobile C# Dev Group 4/8/15) von Ed Snider
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 Snider550 views
Session 16 - Designing universal interface which used for iPad and iPhone von Vu Tran Lam
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
Vu Tran Lam1.8K views
What’s New in iOS 8 SDK ? von E2LOGY
What’s New in iOS 8 SDK ?What’s New in iOS 8 SDK ?
What’s New in iOS 8 SDK ?
E2LOGY2.9K views
In-Flight Infotainment and e-Shopping App | iPad App for shopping von Mike Taylor
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 Taylor435 views
Workflow automation i phone application for a construction company von Mike Taylor
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 Taylor311 views
Application for Data Sync Between Different geo Locations von Mike Taylor
Application for Data Sync Between Different geo LocationsApplication for Data Sync Between Different geo Locations
Application for Data Sync Between Different geo Locations
Mike Taylor555 views
DF14: Drive Salesforce User Productivity with the Pebble SmartWatch von jayvinarora
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
jayvinarora837 views
Build Apps for Apple Watch - Francesco Novelli - Codemotion Milan 2016 von Codemotion
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
Codemotion565 views
Create your First Watchkit App von Pawan Ramteke
Create your First Watchkit AppCreate your First Watchkit App
Create your First Watchkit App
Pawan Ramteke103 views
[CocoaHeads Tricity] watchOS 2 - native apps are coming von Mateusz Klimczak
[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 Klimczak620 views
Siebel connected mobile applications an overview von snuthakki
Siebel connected mobile applications   an overviewSiebel connected mobile applications   an overview
Siebel connected mobile applications an overview
snuthakki3K views
android development training in mumbai von faizrashid1995
android development training in mumbaiandroid development training in mumbai
android development training in mumbai
faizrashid199530 views

Último

predicting-m3-devopsconMunich-2023-v2.pptx von
predicting-m3-devopsconMunich-2023-v2.pptxpredicting-m3-devopsconMunich-2023-v2.pptx
predicting-m3-devopsconMunich-2023-v2.pptxTier1 app
11 views33 Folien
Dapr Unleashed: Accelerating Microservice Development von
Dapr Unleashed: Accelerating Microservice DevelopmentDapr Unleashed: Accelerating Microservice Development
Dapr Unleashed: Accelerating Microservice DevelopmentMiroslav Janeski
13 views29 Folien
Page Object Model von
Page Object ModelPage Object Model
Page Object Modelartembondar5
6 views5 Folien
tecnologia18.docx von
tecnologia18.docxtecnologia18.docx
tecnologia18.docxnosi6702
5 views5 Folien
360 graden fabriek von
360 graden fabriek360 graden fabriek
360 graden fabriekinfo33492
162 views25 Folien
Using Qt under LGPL-3.0 von
Using Qt under LGPL-3.0Using Qt under LGPL-3.0
Using Qt under LGPL-3.0Burkhard Stubert
13 views11 Folien

Último(20)

predicting-m3-devopsconMunich-2023-v2.pptx von Tier1 app
predicting-m3-devopsconMunich-2023-v2.pptxpredicting-m3-devopsconMunich-2023-v2.pptx
predicting-m3-devopsconMunich-2023-v2.pptx
Tier1 app11 views
Dapr Unleashed: Accelerating Microservice Development von Miroslav Janeski
Dapr Unleashed: Accelerating Microservice DevelopmentDapr Unleashed: Accelerating Microservice Development
Dapr Unleashed: Accelerating Microservice Development
Miroslav Janeski13 views
tecnologia18.docx von nosi6702
tecnologia18.docxtecnologia18.docx
tecnologia18.docx
nosi67025 views
360 graden fabriek von info33492
360 graden fabriek360 graden fabriek
360 graden fabriek
info33492162 views
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium... von Lisi Hocke
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Lisi Hocke35 views
Ports-and-Adapters Architecture for Embedded HMI von Burkhard Stubert
Ports-and-Adapters Architecture for Embedded HMIPorts-and-Adapters Architecture for Embedded HMI
Ports-and-Adapters Architecture for Embedded HMI
Burkhard Stubert29 views
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action von Márton Kodok
Gen Apps on Google Cloud PaLM2 and Codey APIs in ActionGen Apps on Google Cloud PaLM2 and Codey APIs in Action
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action
Márton Kodok16 views
How Workforce Management Software Empowers SMEs | TraQSuite von TraQSuite
How Workforce Management Software Empowers SMEs | TraQSuiteHow Workforce Management Software Empowers SMEs | TraQSuite
How Workforce Management Software Empowers SMEs | TraQSuite
TraQSuite6 views
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P... von NimaTorabi2
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...
NimaTorabi216 views
predicting-m3-devopsconMunich-2023.pptx von Tier1 app
predicting-m3-devopsconMunich-2023.pptxpredicting-m3-devopsconMunich-2023.pptx
predicting-m3-devopsconMunich-2023.pptx
Tier1 app8 views
Fleet Management Software in India von Fleetable
Fleet Management Software in India Fleet Management Software in India
Fleet Management Software in India
Fleetable12 views
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx von animuscrm
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
animuscrm15 views
JioEngage_Presentation.pptx von admin125455
JioEngage_Presentation.pptxJioEngage_Presentation.pptx
JioEngage_Presentation.pptx
admin1254558 views

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/