SlideShare a Scribd company logo
1 of 30
Download to read offline
WATCH 
What might it be good for, and how might we use it? 
Carl Brown, 
CocoaCoder.org 
November 13, 2014 
@CarlBrwn 
@CocoaCoder
GET READY TO FIT IN 
The race is about to Start!
SDK SHOULD DROP THIS MONTH 
But what’s in it?
KREMLINOLOGY 
“… to examine the smallest minutiae to learn what was happening inside 
the walls of [a closed system]” 
c.f. http://www.imore.com/nsfw-september-apple-event-kremlinology-and-blind-luck
NOTABLE KREMLINOLOGIST @_DAVIDSMITH 
http://david-smith.org/blog/2014/11/06/expectations-for-watchkit/ 
http://developingperspective.com/2014/10/31/201/
WATCH — DEVELOPER VIEW 
• With Apple Watch, developers can create WatchKit apps with 
actionable notifications and Glances that provide timely 
information. 
• Starting later next year, developers will be able to create fully 
native apps for Apple Watch. 
http://www.apple.com/pr/library/2014/09/09Apple-Unveils-Apple-Watch-Apples-Most-Personal-Device-Ever.html
ACTIONABLE NOTIFICATIONS 
Notifications present the user with options
LOOK FAMILIAR? 
That looks an awful lot like iOS8 interactive notifications…
PRE-WATCH 
NOTIFICATIONS 
•BTLE Profile based 
•One-way 
•Pebble Watch, et. al. 
https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/AppleNotificationCenterServiceSpecification/Introduction/Introduction.html
PRE-WATCH NOTIFICATIONS 
OLD AND BUSTED 
https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/AppleNotificationCenterServiceSpecification/Introduction/Introduction.html
ACTIONABLE NOTIFICATIONS 
The new Hotness
GLANCES 
Swipe from Bottom to Open 
Side to Side to Switch Between
DÉJÀ VU? 
Glances act like Today Screen Widgets, don’t you think?
POSTULATED: 
WATCH Actionable Notifications and Glances will be implemented in 
WatchKit similarly to iOS8 Notifications and Widgets
ACTIONABLE NOTIFICATIONS 
How might you create one?
CREATING NEW NOTIFICATIONS 
let firstAction = UIMutableUserNotificationAction() 
firstAction.identifier = Actions.first.rawValue 
firstAction.title = "FIRST" 
firstAction.activationMode = UIUserNotificationActivationMode.Background 
firstAction.authenticationRequired = true 
firstAction.destructive = false 
let notificationCategory = UIMutableUserNotificationCategory() 
notificationCategory.identifier = categoryID 
! 
notificationCategory.setActions([firstAction, secondAction, resetAction], 
forContext: UIUserNotificationActionContext.Default) 
let types = UIUserNotificationType.Alert | UIUserNotificationType.Sound 
let settings = UIUserNotificationSettings(forTypes: types, 
categories: NSSet(object: notificationCategory)) 
! 
UIApplication.sharedApplication().registerUserNotificationSettings(settings)
SENDING NEW NOTIFICATIONS 
let notification = UILocalNotification() 
notification.alertBody = “Text Here" 
notification.soundName = UILocalNotificationDefaultSoundName 
notification.fireDate = NSDate() 
notification.category = categoryID 
UIApplication.sharedApplication().scheduleLocalNotification(notification)
HANDLING NEW NOTIFICATIONS 
func application(application: UIApplication, 
handleActionWithIdentifier identifier: String?, 
forLocalNotification notification: UILocalNotification, 
completionHandler: () -> Void) { 
if notification.category == categoryID { 
let action:Actions = Actions(rawValue: identifier!)! 
switch action{ 
case Actions.first: 
doStuff() 
case Actions.cancel: 
cancelStuff() 
} 
} 
completionHandler() 
}
GLANCES 
How might you create one?
CREATING GLANCES/WIDGETS
CONFIGURING GLANCES/WIDGETS
IMPLEMENTING GLANCES/WIDGETS 
class TodayViewController: UIViewController, NCWidgetProviding { 
override func viewDidLoad() {} 
override func viewDidAppear(animated: Bool) {} 
override func viewDidLayoutSubviews() {} 
} 
• Must use Auto layout 
• Use setPreferredContentSize:
UPDATING GLANCES/WIDGETS 
func widgetPerformUpdateWithCompletionHandler( 
completionHandler: ((NCUpdateResult) -> Void)!) { 
doStuff { error in 
if error == nil { 
self.update() 
completionHandler(.NewData) 
} else { 
completionHandler(.NoData) 
} 
} 
}
RESIZING WIDGETS 
override func viewWillTransitionToSize(size: CGSize, 
withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) { 
coordinator.animateAlongsideTransition({ 
(context: UIViewControllerTransitionCoordinatorContext!) -> Void in 
self.preferredContentSize = size; 
}, completion: { 
(context: UIViewControllerTransitionCoordinatorContext!) -> Void in 
self.view.alpha = 1.0 
}) 
}
UNANSWERED QUESTIONS 
• Will we be able to access to sensor info (accelerometer, etc) in this month’s SDK? 
• How does your app know if there’s a connected watch? 
• Will the same code get called for NotificationCenter and WATCH by default? 
• Will Apple allow “WATCH Required” apps in January or will your app have to 
function without one? 
• How long before WatchKit apps can be submitted for review?
SO WHAT’S A 
GOOD USE FOR A 
GLANCE? 
Good Question. 
! 
Guessing there will be some risk. 
! 
Thoughts? 
http://techcrunch.com/2014/10/30/apple-no-longer-rejecting-calculator-widgets-from-the-app-store/
SO WHAT’S A 
GOOD USE FOR A 
GLANCE? 
Good Question. 
! 
Guessing there will be some risk. 
! 
Thoughts? 
http://www.tuaw.com/2014/11/12/overglide-is-a-game-for-your-ios-notification-screen/
N.F.W. — JUST DON’T 
A Plea on behalf of your users 
http://www.campaignlive.com/article/apple-watch-its-time-new-ad-designs/1321477
CONSIDER THIS 
A Plea on behalf of your potential users 
http://www.wired.com/2014/11/where-fitness-trackers-fail/
FURTHER RESOURCES 
• http://david-smith.org/blog/2014/11/06/expectations-for-watchkit/ 
• http://www.thinkandbuild.it/interactive-notifications-with-notification-actions/ 
• WWDC 2014 Session 205: Creating Extensions for iOS and OS X, Part 1 
• http://www.raywenderlich.com/83809/ios-8-today-extension-tutorial 
• http://www.mutualmobile.com/posts/apple-watch-apps-want-to-write 
• http://www.wired.com/2014/11/where-fitness-trackers-fail/ 
• http://keynotopia.com/apple-watch-ui-kit/ 
• https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/ 
AppleNotificationCenterServiceSpecification/Introduction/Introduction.html

More Related Content

Similar to Cocoa coders 141113-watch

Lecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptxLecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptxNgLQun
 
Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014
Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014
Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014Pebble Technology
 
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...mharkus
 
Break Timer: Android-wear introduction and application case-study
Break Timer: Android-wear introduction and application case-studyBreak Timer: Android-wear introduction and application case-study
Break Timer: Android-wear introduction and application case-studyUmair Vatao
 
WWDC 15 - Apple's Developer Event @ 8-12 June, 2015
WWDC 15 - Apple's Developer Event @ 8-12 June, 2015WWDC 15 - Apple's Developer Event @ 8-12 June, 2015
WWDC 15 - Apple's Developer Event @ 8-12 June, 2015Burcu Geneci
 
KKBOX WWDC17 Notification and Autolayout - Jefferey
KKBOX WWDC17 Notification and Autolayout - JeffereyKKBOX WWDC17 Notification and Autolayout - Jefferey
KKBOX WWDC17 Notification and Autolayout - JeffereyLiyao Chen
 
Ruby motion勉強会 2012年7月
Ruby motion勉強会 2012年7月Ruby motion勉強会 2012年7月
Ruby motion勉強会 2012年7月Eihiro Saishu
 
I WATCH DOCUMENTATION
I WATCH DOCUMENTATIONI WATCH DOCUMENTATION
I WATCH DOCUMENTATIONAnurag Reddy
 
Automating the Gaps of Unit Testing Mobile Apps
Automating the Gaps of Unit Testing Mobile AppsAutomating the Gaps of Unit Testing Mobile Apps
Automating the Gaps of Unit Testing Mobile AppsGeoffrey Goetz
 
Delegateless Coordinators - take 2
Delegateless Coordinators - take 2Delegateless Coordinators - take 2
Delegateless Coordinators - take 2Tales Andrade
 
Cucumber meets iPhone
Cucumber meets iPhoneCucumber meets iPhone
Cucumber meets iPhoneErin Dees
 
How to Make an Inventory App | No Code App Development
How to Make an Inventory App | No Code App DevelopmentHow to Make an Inventory App | No Code App Development
How to Make an Inventory App | No Code App DevelopmentAppSheet
 
Android Wear: A Developer's Perspective
Android Wear: A Developer's PerspectiveAndroid Wear: A Developer's Perspective
Android Wear: A Developer's PerspectiveVin Lim
 
Android 5.0 internals and inferiority complex droidcon.de 2015
Android 5.0 internals and inferiority complex droidcon.de 2015Android 5.0 internals and inferiority complex droidcon.de 2015
Android 5.0 internals and inferiority complex droidcon.de 2015Aleksander Piotrowski
 
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 companyMike Taylor
 
Rockstar Android Testing (Mobile TechCon Munich 2014)
Rockstar Android Testing (Mobile TechCon Munich 2014)Rockstar Android Testing (Mobile TechCon Munich 2014)
Rockstar Android Testing (Mobile TechCon Munich 2014)Danny Preussler
 

Similar to Cocoa coders 141113-watch (20)

Lecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptxLecture 12 - Maps, AR_VR_aaaaHardware.pptx
Lecture 12 - Maps, AR_VR_aaaaHardware.pptx
 
iOS Development (Part 2)
iOS Development (Part 2)iOS Development (Part 2)
iOS Development (Part 2)
 
Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014
Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014
Thomas Sarlandie Kickoff Talk | Pebble Developer Retreat 2014
 
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
 
Introduction of Xcode
Introduction of XcodeIntroduction of Xcode
Introduction of Xcode
 
Break Timer: Android-wear introduction and application case-study
Break Timer: Android-wear introduction and application case-studyBreak Timer: Android-wear introduction and application case-study
Break Timer: Android-wear introduction and application case-study
 
WWDC 15 - Apple's Developer Event @ 8-12 June, 2015
WWDC 15 - Apple's Developer Event @ 8-12 June, 2015WWDC 15 - Apple's Developer Event @ 8-12 June, 2015
WWDC 15 - Apple's Developer Event @ 8-12 June, 2015
 
Android Wearable App
Android Wearable AppAndroid Wearable App
Android Wearable App
 
KKBOX WWDC17 Notification and Autolayout - Jefferey
KKBOX WWDC17 Notification and Autolayout - JeffereyKKBOX WWDC17 Notification and Autolayout - Jefferey
KKBOX WWDC17 Notification and Autolayout - Jefferey
 
AngularJS 101
AngularJS 101AngularJS 101
AngularJS 101
 
Ruby motion勉強会 2012年7月
Ruby motion勉強会 2012年7月Ruby motion勉強会 2012年7月
Ruby motion勉強会 2012年7月
 
I WATCH DOCUMENTATION
I WATCH DOCUMENTATIONI WATCH DOCUMENTATION
I WATCH DOCUMENTATION
 
Automating the Gaps of Unit Testing Mobile Apps
Automating the Gaps of Unit Testing Mobile AppsAutomating the Gaps of Unit Testing Mobile Apps
Automating the Gaps of Unit Testing Mobile Apps
 
Delegateless Coordinators - take 2
Delegateless Coordinators - take 2Delegateless Coordinators - take 2
Delegateless Coordinators - take 2
 
Cucumber meets iPhone
Cucumber meets iPhoneCucumber meets iPhone
Cucumber meets iPhone
 
How to Make an Inventory App | No Code App Development
How to Make an Inventory App | No Code App DevelopmentHow to Make an Inventory App | No Code App Development
How to Make an Inventory App | No Code App Development
 
Android Wear: A Developer's Perspective
Android Wear: A Developer's PerspectiveAndroid Wear: A Developer's Perspective
Android Wear: A Developer's Perspective
 
Android 5.0 internals and inferiority complex droidcon.de 2015
Android 5.0 internals and inferiority complex droidcon.de 2015Android 5.0 internals and inferiority complex droidcon.de 2015
Android 5.0 internals and inferiority complex droidcon.de 2015
 
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
 
Rockstar Android Testing (Mobile TechCon Munich 2014)
Rockstar Android Testing (Mobile TechCon Munich 2014)Rockstar Android Testing (Mobile TechCon Munich 2014)
Rockstar Android Testing (Mobile TechCon Munich 2014)
 

More from Carl Brown

GDPR, User Data, Privacy, and Your Apps
GDPR, User Data, Privacy, and Your AppsGDPR, User Data, Privacy, and Your Apps
GDPR, User Data, Privacy, and Your AppsCarl Brown
 
New in iOS 11.3b4 and Xcode 9.3b4
New in iOS 11.3b4 and Xcode 9.3b4New in iOS 11.3b4 and Xcode 9.3b4
New in iOS 11.3b4 and Xcode 9.3b4Carl Brown
 
Managing Memory in Swift (Yes, that's a thing)
Managing Memory in Swift (Yes, that's a thing)Managing Memory in Swift (Yes, that's a thing)
Managing Memory in Swift (Yes, that's a thing)Carl Brown
 
Better Swift from the Foundation up #tryswiftnyc17 09-06
Better Swift from the Foundation up #tryswiftnyc17 09-06Better Swift from the Foundation up #tryswiftnyc17 09-06
Better Swift from the Foundation up #tryswiftnyc17 09-06Carl Brown
 
Generics, the Swift ABI and you
Generics, the Swift ABI and youGenerics, the Swift ABI and you
Generics, the Swift ABI and youCarl Brown
 
Swift GUI Development without Xcode
Swift GUI Development without XcodeSwift GUI Development without Xcode
Swift GUI Development without XcodeCarl Brown
 
what's new in iOS10 2016-06-23
what's new in iOS10 2016-06-23what's new in iOS10 2016-06-23
what's new in iOS10 2016-06-23Carl Brown
 
Open Source Swift: Up and Running
Open Source Swift: Up and RunningOpen Source Swift: Up and Running
Open Source Swift: Up and RunningCarl Brown
 
Parse migration CocoaCoders April 28th, 2016
Parse migration CocoaCoders April 28th, 2016Parse migration CocoaCoders April 28th, 2016
Parse migration CocoaCoders April 28th, 2016Carl Brown
 
Swift 2.2 Design Patterns CocoaConf Austin 2016
Swift 2.2 Design Patterns CocoaConf Austin 2016Swift 2.2 Design Patterns CocoaConf Austin 2016
Swift 2.2 Design Patterns CocoaConf Austin 2016Carl Brown
 
Advanced, Composable Collection Views, From CocoaCoders meetup Austin Feb 12,...
Advanced, Composable Collection Views, From CocoaCoders meetup Austin Feb 12,...Advanced, Composable Collection Views, From CocoaCoders meetup Austin Feb 12,...
Advanced, Composable Collection Views, From CocoaCoders meetup Austin Feb 12,...Carl Brown
 
iOS8 and the new App Store
iOS8 and the new App Store   iOS8 and the new App Store
iOS8 and the new App Store Carl Brown
 
Dark Art of Software Estimation 360iDev2014
Dark Art of Software Estimation 360iDev2014Dark Art of Software Estimation 360iDev2014
Dark Art of Software Estimation 360iDev2014Carl Brown
 
Intro to cloud kit Cocoader.org 24 July 2014
Intro to cloud kit   Cocoader.org 24 July 2014Intro to cloud kit   Cocoader.org 24 July 2014
Intro to cloud kit Cocoader.org 24 July 2014Carl Brown
 
Welcome to Swift (CocoaCoder 6/12/14)
Welcome to Swift (CocoaCoder 6/12/14)Welcome to Swift (CocoaCoder 6/12/14)
Welcome to Swift (CocoaCoder 6/12/14)Carl Brown
 
Writing Apps that Can See: Getting Data from CoreImage to Computer Vision - ...
Writing Apps that Can See: Getting Data from CoreImage to Computer  Vision - ...Writing Apps that Can See: Getting Data from CoreImage to Computer  Vision - ...
Writing Apps that Can See: Getting Data from CoreImage to Computer Vision - ...Carl Brown
 
Introduction to Git Commands and Concepts
Introduction to Git Commands and ConceptsIntroduction to Git Commands and Concepts
Introduction to Git Commands and ConceptsCarl Brown
 
REST/JSON/CoreData Example Code - A Tour
REST/JSON/CoreData Example Code - A TourREST/JSON/CoreData Example Code - A Tour
REST/JSON/CoreData Example Code - A TourCarl Brown
 
360iDev iOS AntiPatterns
360iDev iOS AntiPatterns360iDev iOS AntiPatterns
360iDev iOS AntiPatternsCarl Brown
 

More from Carl Brown (20)

GDPR, User Data, Privacy, and Your Apps
GDPR, User Data, Privacy, and Your AppsGDPR, User Data, Privacy, and Your Apps
GDPR, User Data, Privacy, and Your Apps
 
New in iOS 11.3b4 and Xcode 9.3b4
New in iOS 11.3b4 and Xcode 9.3b4New in iOS 11.3b4 and Xcode 9.3b4
New in iOS 11.3b4 and Xcode 9.3b4
 
Managing Memory in Swift (Yes, that's a thing)
Managing Memory in Swift (Yes, that's a thing)Managing Memory in Swift (Yes, that's a thing)
Managing Memory in Swift (Yes, that's a thing)
 
Better Swift from the Foundation up #tryswiftnyc17 09-06
Better Swift from the Foundation up #tryswiftnyc17 09-06Better Swift from the Foundation up #tryswiftnyc17 09-06
Better Swift from the Foundation up #tryswiftnyc17 09-06
 
Generics, the Swift ABI and you
Generics, the Swift ABI and youGenerics, the Swift ABI and you
Generics, the Swift ABI and you
 
Swift GUI Development without Xcode
Swift GUI Development without XcodeSwift GUI Development without Xcode
Swift GUI Development without Xcode
 
what's new in iOS10 2016-06-23
what's new in iOS10 2016-06-23what's new in iOS10 2016-06-23
what's new in iOS10 2016-06-23
 
Open Source Swift: Up and Running
Open Source Swift: Up and RunningOpen Source Swift: Up and Running
Open Source Swift: Up and Running
 
Parse migration CocoaCoders April 28th, 2016
Parse migration CocoaCoders April 28th, 2016Parse migration CocoaCoders April 28th, 2016
Parse migration CocoaCoders April 28th, 2016
 
Swift 2.2 Design Patterns CocoaConf Austin 2016
Swift 2.2 Design Patterns CocoaConf Austin 2016Swift 2.2 Design Patterns CocoaConf Austin 2016
Swift 2.2 Design Patterns CocoaConf Austin 2016
 
Advanced, Composable Collection Views, From CocoaCoders meetup Austin Feb 12,...
Advanced, Composable Collection Views, From CocoaCoders meetup Austin Feb 12,...Advanced, Composable Collection Views, From CocoaCoders meetup Austin Feb 12,...
Advanced, Composable Collection Views, From CocoaCoders meetup Austin Feb 12,...
 
Gcd cc-150205
Gcd cc-150205Gcd cc-150205
Gcd cc-150205
 
iOS8 and the new App Store
iOS8 and the new App Store   iOS8 and the new App Store
iOS8 and the new App Store
 
Dark Art of Software Estimation 360iDev2014
Dark Art of Software Estimation 360iDev2014Dark Art of Software Estimation 360iDev2014
Dark Art of Software Estimation 360iDev2014
 
Intro to cloud kit Cocoader.org 24 July 2014
Intro to cloud kit   Cocoader.org 24 July 2014Intro to cloud kit   Cocoader.org 24 July 2014
Intro to cloud kit Cocoader.org 24 July 2014
 
Welcome to Swift (CocoaCoder 6/12/14)
Welcome to Swift (CocoaCoder 6/12/14)Welcome to Swift (CocoaCoder 6/12/14)
Welcome to Swift (CocoaCoder 6/12/14)
 
Writing Apps that Can See: Getting Data from CoreImage to Computer Vision - ...
Writing Apps that Can See: Getting Data from CoreImage to Computer  Vision - ...Writing Apps that Can See: Getting Data from CoreImage to Computer  Vision - ...
Writing Apps that Can See: Getting Data from CoreImage to Computer Vision - ...
 
Introduction to Git Commands and Concepts
Introduction to Git Commands and ConceptsIntroduction to Git Commands and Concepts
Introduction to Git Commands and Concepts
 
REST/JSON/CoreData Example Code - A Tour
REST/JSON/CoreData Example Code - A TourREST/JSON/CoreData Example Code - A Tour
REST/JSON/CoreData Example Code - A Tour
 
360iDev iOS AntiPatterns
360iDev iOS AntiPatterns360iDev iOS AntiPatterns
360iDev iOS AntiPatterns
 

Recently uploaded

WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2
 
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...WSO2
 
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
WSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
WSO2CON2024 - Why Should You Consider Ballerina for Your Next IntegrationWSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
WSO2CON2024 - Why Should You Consider Ballerina for Your Next IntegrationWSO2
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & InnovationWSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & InnovationWSO2
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfAzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfryanfarris8
 
WSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2
 
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2
 

Recently uploaded (20)

WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
WSO2Con2024 - Navigating the Digital Landscape: Transforming Healthcare with ...
 
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
WSO2Con2024 - Facilitating Broadband Switching Services for UK Telecoms Provi...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
WSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
WSO2CON2024 - Why Should You Consider Ballerina for Your Next IntegrationWSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
WSO2CON2024 - Why Should You Consider Ballerina for Your Next Integration
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & InnovationWSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
WSO2CON 2024 - OSU & WSO2: A Decade Journey in Integration & Innovation
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public AdministrationWSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
WSO2CON 2024 - How CSI Piemonte Is Apifying the Public Administration
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdfAzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
AzureNativeQumulo_HPC_Cloud_Native_Benchmarks.pdf
 
WSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital BusinessesWSO2CON 2024 - Software Engineering for Digital Businesses
WSO2CON 2024 - Software Engineering for Digital Businesses
 
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
 

Cocoa coders 141113-watch

  • 1. WATCH What might it be good for, and how might we use it? Carl Brown, CocoaCoder.org November 13, 2014 @CarlBrwn @CocoaCoder
  • 2. GET READY TO FIT IN The race is about to Start!
  • 3. SDK SHOULD DROP THIS MONTH But what’s in it?
  • 4. KREMLINOLOGY “… to examine the smallest minutiae to learn what was happening inside the walls of [a closed system]” c.f. http://www.imore.com/nsfw-september-apple-event-kremlinology-and-blind-luck
  • 5. NOTABLE KREMLINOLOGIST @_DAVIDSMITH http://david-smith.org/blog/2014/11/06/expectations-for-watchkit/ http://developingperspective.com/2014/10/31/201/
  • 6. WATCH — DEVELOPER VIEW • With Apple Watch, developers can create WatchKit apps with actionable notifications and Glances that provide timely information. • Starting later next year, developers will be able to create fully native apps for Apple Watch. http://www.apple.com/pr/library/2014/09/09Apple-Unveils-Apple-Watch-Apples-Most-Personal-Device-Ever.html
  • 7. ACTIONABLE NOTIFICATIONS Notifications present the user with options
  • 8. LOOK FAMILIAR? That looks an awful lot like iOS8 interactive notifications…
  • 9. PRE-WATCH NOTIFICATIONS •BTLE Profile based •One-way •Pebble Watch, et. al. https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/AppleNotificationCenterServiceSpecification/Introduction/Introduction.html
  • 10. PRE-WATCH NOTIFICATIONS OLD AND BUSTED https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/AppleNotificationCenterServiceSpecification/Introduction/Introduction.html
  • 12. GLANCES Swipe from Bottom to Open Side to Side to Switch Between
  • 13. DÉJÀ VU? Glances act like Today Screen Widgets, don’t you think?
  • 14. POSTULATED: WATCH Actionable Notifications and Glances will be implemented in WatchKit similarly to iOS8 Notifications and Widgets
  • 15. ACTIONABLE NOTIFICATIONS How might you create one?
  • 16. CREATING NEW NOTIFICATIONS let firstAction = UIMutableUserNotificationAction() firstAction.identifier = Actions.first.rawValue firstAction.title = "FIRST" firstAction.activationMode = UIUserNotificationActivationMode.Background firstAction.authenticationRequired = true firstAction.destructive = false let notificationCategory = UIMutableUserNotificationCategory() notificationCategory.identifier = categoryID ! notificationCategory.setActions([firstAction, secondAction, resetAction], forContext: UIUserNotificationActionContext.Default) let types = UIUserNotificationType.Alert | UIUserNotificationType.Sound let settings = UIUserNotificationSettings(forTypes: types, categories: NSSet(object: notificationCategory)) ! UIApplication.sharedApplication().registerUserNotificationSettings(settings)
  • 17. SENDING NEW NOTIFICATIONS let notification = UILocalNotification() notification.alertBody = “Text Here" notification.soundName = UILocalNotificationDefaultSoundName notification.fireDate = NSDate() notification.category = categoryID UIApplication.sharedApplication().scheduleLocalNotification(notification)
  • 18. HANDLING NEW NOTIFICATIONS func application(application: UIApplication, handleActionWithIdentifier identifier: String?, forLocalNotification notification: UILocalNotification, completionHandler: () -> Void) { if notification.category == categoryID { let action:Actions = Actions(rawValue: identifier!)! switch action{ case Actions.first: doStuff() case Actions.cancel: cancelStuff() } } completionHandler() }
  • 19. GLANCES How might you create one?
  • 22. IMPLEMENTING GLANCES/WIDGETS class TodayViewController: UIViewController, NCWidgetProviding { override func viewDidLoad() {} override func viewDidAppear(animated: Bool) {} override func viewDidLayoutSubviews() {} } • Must use Auto layout • Use setPreferredContentSize:
  • 23. UPDATING GLANCES/WIDGETS func widgetPerformUpdateWithCompletionHandler( completionHandler: ((NCUpdateResult) -> Void)!) { doStuff { error in if error == nil { self.update() completionHandler(.NewData) } else { completionHandler(.NoData) } } }
  • 24. RESIZING WIDGETS override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) { coordinator.animateAlongsideTransition({ (context: UIViewControllerTransitionCoordinatorContext!) -> Void in self.preferredContentSize = size; }, completion: { (context: UIViewControllerTransitionCoordinatorContext!) -> Void in self.view.alpha = 1.0 }) }
  • 25. UNANSWERED QUESTIONS • Will we be able to access to sensor info (accelerometer, etc) in this month’s SDK? • How does your app know if there’s a connected watch? • Will the same code get called for NotificationCenter and WATCH by default? • Will Apple allow “WATCH Required” apps in January or will your app have to function without one? • How long before WatchKit apps can be submitted for review?
  • 26. SO WHAT’S A GOOD USE FOR A GLANCE? Good Question. ! Guessing there will be some risk. ! Thoughts? http://techcrunch.com/2014/10/30/apple-no-longer-rejecting-calculator-widgets-from-the-app-store/
  • 27. SO WHAT’S A GOOD USE FOR A GLANCE? Good Question. ! Guessing there will be some risk. ! Thoughts? http://www.tuaw.com/2014/11/12/overglide-is-a-game-for-your-ios-notification-screen/
  • 28. N.F.W. — JUST DON’T A Plea on behalf of your users http://www.campaignlive.com/article/apple-watch-its-time-new-ad-designs/1321477
  • 29. CONSIDER THIS A Plea on behalf of your potential users http://www.wired.com/2014/11/where-fitness-trackers-fail/
  • 30. FURTHER RESOURCES • http://david-smith.org/blog/2014/11/06/expectations-for-watchkit/ • http://www.thinkandbuild.it/interactive-notifications-with-notification-actions/ • WWDC 2014 Session 205: Creating Extensions for iOS and OS X, Part 1 • http://www.raywenderlich.com/83809/ios-8-today-extension-tutorial • http://www.mutualmobile.com/posts/apple-watch-apps-want-to-write • http://www.wired.com/2014/11/where-fitness-trackers-fail/ • http://keynotopia.com/apple-watch-ui-kit/ • https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/ AppleNotificationCenterServiceSpecification/Introduction/Introduction.html