Updating for Apple Watch Series 3

WWDC 2018

Posted by Den on September 30, 2018 · 4 mins read
Updating for Apple Watch Series 3

Updating for Apple Watch Series 3

Tech Talks

Updating for Apple Watch Series 3

Tech Talks

WiFi, Cellular

URLSession

  • Initiate requests from Apple Watch
  • Requests may be proxied through iPhone

URLSession Over Cellular

  • Default and ephemeral sessions
    -
    Allowed when app state is active
    - Disallowed when app state is inactive or background
     Except when in a background navigation mode
  • Background sessions
    - Smaller transfers are better
    - Transfers may be deferred until later
    - Response will wake your app in frontmost app state

Best Practices

  • Use waitsForConnectivity instead of SCNetworkReachbility
  • applicationWillResignActive()
  • Use the shared URLSession for multiple tasks

Watch Connectivity

  • Use for initial setup
  • Background transfers
  • Update application context for newer data

Barometric Altimeter

CMAltimeter

  • Determines device availability
  • Surfaces authorization status
  • Starts and stops altitude updates

CMAltitudeData

  • Timestamp
    - Number of seconds since reference date
  • Relative altitude
    - Change in altitude since last reported event ( in meters )
  • Pressure
    - Recorded pressure ( in kilopascals )