The Apple Watch is the next big thing with consumers. Learn everything from the basics of interaction design for the Apple Watch to how to develop fast and powerful apps that your users need to have. Everything you need to know to make the next killer app.
25. // NotificationController
override func didReceiveRemoteNotification(
remoteNotification: [NSObject : AnyObject],
withCompletion completionHandler:
((WKUserNotificationInterfaceType) -> Void))
{
// This method is called when
// a remote notification needs to be presented.
// Implement it if you use a dynamic
// notification interface.
// Populate your dynamic notification interface
// as quickly as possible.
//
// After populating your dynamic notification
// interface call the completion block.
completionHandler(.Custom)
//completionHandler(.Default)
}
26.
27. // InterfaceController
override func handleActionWithIdentifier(
identifier: String?,
forRemoteNotification
remoteNotification: [NSObject : AnyObject])
{
if let identifier = identifier
where identifier == "showMinionsAction"
{
// configure display
}
}
38. // iOS app
struct Session {
let startTime: NSDate
let endTime: NSDate
let description: String
let location: String
let speaker: Speaker?
}
// Watch App
struct Session {
let startTime: NSDate
let endTime: NSDate
let location: String
let speaker: Speaker?
let index: Int
}
49. // check needed for iOS App Only
if WCSession.isSupported() {
// activate session for both!
let session = WCSession.defaultSession()
session.delegate = self
session.activateSession()
}
50. How to Win on the ⌚
• Notifications
• Complications
• Watch Connectivity