wearables + azure development
TRANSCRIPT
All collected photos: http://bit.ly/globalazurebandung
Powered by http://jepret.in
Andri Yadi@andri_yadi | a at dycode dot com
http://andriyadi.me
Wearable (obviously), invisible* Targeted (limited) capabilities Have (limited) computing unit (Mostly) not standalone Programmable, yay!
What they have in common
Common development Challenges
Fragmentation Limited capabilitySuch as: no direct internet connectivity Limited APINew technology, most APIs are in development Too much relies on “host” machine
Market
$12 billion by 2018 78% annual growth rate
http://www.statista.com/statistics/259372/wearable-device-market-value/http://sproutsocial.com/insights/wearables-technology-social-media/
Intro to WatchKit Backend service with AzureConnecting watch app to Azure backend
for 50 mins, we’ ll cover…
http://developer.apple.com/ios
iOS 8.2
we need…
WatchKit
CoreFoundation Extensions WatchKitUIKit
Foundation
PushNotification
Few iOS frameworks you should know
Handoff
AccelerateAccounts
AddressBook
AddressBookUI
AdSupport
AssetsLibrary
AudioToolbox
AudioUnit
AVFoundation
AVKitCFNetwork
CloudKit
CoreAudio
CoreAudioKit
CoreBluetooth
CoreData
CoreFoundation
CoreGraphics
CoreImage
CoreLocation
CoreMedia
CoreMIDI
CoreMotion
CoreTelephony
CoreTextCoreVideo
EventKitEventKitUI
ExternalAccessory
Foundation
GameController
GameKit
GLKit
GSS
HealthKit
HomeKit
iAd
ImageIO
IOKit
JavaScriptCore
LocalAuthentication
MapKit
MediaAccessibility
MediaPlayer
MediaToolbox
MessageUI
Metal
MobileCoreServices
MultipeerConnectivity
NetworkExtension
NewsstandKit
NotificationCenter
OpenAL
OpenGLES
PassKit
Photos
PhotosUI
PushKit
QuartzCore
QuickLook
SafariServices
SceneKit
Security
Social
SpriteKit
StoreKit
SystemConfiguration
UIKitVideoToolbox
WebKit
Clie
nt la
yer
(on-
prem
ises
)
Tablet PhoneGames consolePC
On-premises databaseBrowserOffice Add-in
On-premises service
ADMultifactor Authentication
Acc
ess
Cont
rol
Laye
r In
tegr
atio
n
laye
r
Service Bus CDNBizTalk Services
Traffic Manager
Virtual Networks Express Route
App
licat
ion
laye
r
API Mgmt Web AppsCloud ServicesVMMobile Apps Media Services
Notification Hubs Scheduler Automation
Dat
a La
yer
Storage Blobs Tables Queues DataMachine Learning HD Insight
Backup and RecoverySQL Database Caching StorSimple
API Apps
Logic Apps
Microsoft Azure Services
So, what’s the options?
Deploy your backend code on a Virtual Machine
Deploy your backend code on a Cloud Service
Create App Service instance, e.g. using Mobile App type
API APPSEasily build and consume APIs in
the cloud
WEB APPSWeb apps that scale with your
business
LOGIC APPSAutomate business process
across SaaS and on-premises
MOBILE APPSBuild Mobile apps for any device
Azure App Service
WatchKit App
Storyboard
Resources
iOS App
WatchKit Extension
Code
Resources
Internet
Bluetooth
Azure App Service
application(application: UIApplication, handleWatchKitExtensionRequest userInfo: [NSObject : AnyObject]?, reply: (([NSObject : AnyObject]!)
WKInterfaceController.openParentApplication() Internet
Azure App Service or any backend
service
[“action": “loadTasks"]
[“data": task dictionary array,
“error”: “error string”]
WatchKit Extension & iOS app communication
WatchKit Extension iOS App
Calling “openParentApplication” on WatchKit extension side will be handled by “handleWatchKitExtensionRequest” on iOS app side.
WatchKit Extension & iOS app communication - loading tasks
WKInterfaceController.openParentApplication(["action": "loadTasks"], reply: { (replyInfo, error) -> Void in if error != nil { //do something about error } let replyDict = replyInfo as [NSObject : AnyObject] if let errorMsg = replyDict["error"] as? String { if !errorMsg.isEmpty { //do something about error return } } self.records = replyDict["data"] as! [Dictionary<String, AnyObject>] self.configureTable() //reload table })
func application(application: UIApplication, handleWatchKitExtensionRequest userInfo: [NSObject : AnyObject]?, reply: (([NSObject : AnyObject]!) -> Void)!) {
if let userInfo = userInfo { if let action = userInfo["action"] as? String { if action == "loadTasks" { println("userInfo: \(userInfo)") //do load tasks from Azure loadTasks (reply) } else if action == "completeTask" { if let data = userInfo["data"] as? Dictionary<String, AnyObject> { //update data to Azure completeTask(data, reply: reply) } } } } }
WatchKit Extension side - InterfaceController.swift iOS app side - AppDelegate.swift
Get started with AzureVisit azure.com
Free trial! worth $200 Or create temporary service: https://trywebsites.azurewebsites.net
DyCode www.dycode.com
office at dycode dot com | @dycode
Thanks