[cocoaheads tricity] watchos 2 - native apps are coming
Post on 07-Apr-2017
437 Views
Preview:
TRANSCRIPT
watchOS 2.0 – what’s new
! Architecture changes
! More access to the hardware
! Storing data in Keychain
! Tetherless Wi-Fi
! New interface objects
! Animations
Architecture changes
! All interactions with the watch app must be communicated back to the iPhone
! Hence the watch has this inherent reliance on the iPhone in order to work
! Apps took a long time to load
Architecture changes
! No need to send data back and forth between the containing iOS app and the watch app
! Communication has changed: Shared App Groups are no longer available, you need to use Watch Connectivity Framework instead
Communication
! With Watch Connectivity Framework you can pass files and data back and forth between the watch and its paired iPhone
! If both apps are running in the foreground, then the communication is live, otherwise it happens in the background so that the data or files is available when the receiving app is launched
! WCSession object handles all the communication between the two devices (accessed through defaultSession singleton object)
More access to the Hardware
! Accelerometer
! Microphone
! Heart rate monitor
! Taptic Engine
! Complications
! Digital crown
Animations
! In old approach you had to cycle through a pre-generated series of images (it is still available)
! Now you can animate changes to the following properties of WKInterfaceObject: ! alpha
! width and height
! vertical and horizontal alignment
! background color
! layout group insets
Notifications
! Apple Watch takes full advantage of the existing interactive notification support on iOS
! If your app supports notification, Apple Watch displays those notifications at appropriate times
! iOS decides whether to display that notification on the iPhone or on the Apple Watch
! There are 2 types of notifications: Short-Look and Long-Look.
Short-Look notifications
! The Short-Look interface is a nonscrolling screen that cannot be customized
! The system uses a template to display the app name and icon along with the title string
! If the user raises their wrist after a slight pause, the Short-Look notification will transition to the Long-Look notification
Long-Look notifications
! The Long-Look interface is a scrollable screen that displays the notification’s content and any associated action buttons
! If you do not provide a custom notification interface, Apple Watch displays a default interface that includes your app icon, the title string of the notification and the alert message
Glances
! A glance is a supplemental way for the user to view important information from your app
! It is separated from your app’s other interface controllers
! No all apps need a glance
! A glance provides immediately relevant information in a timely manner
! Glances should be quick and easy to read, so user won’t have to stop and examine it closely
! Glances do not support interactivity – tapping on a glance automatically launches your WatchKit app
Complications
! Complications are small visual elements that appear on the watch face and convey important information to the user
! Complication are visible whenever the user looks at Apple Watch to check the time
! Complications can be updated by: ! Explicitly when you WatchKit extensions is
running
! Ask ClockKit to wake your WatchKit extension at periodic intervals
! Use push notifications to update your data
! Transfer time-sensitive data from your iOS app
top related