WWDC 19
Creating Independent Watch Apps
Watch apps can now be independent – iPhone app is now optional
Up to watchOS 5, the Watch app was embedded in the iOS app and both were downloaded to the iPhone. iPhone then handled the task of installing the Watch app to the Watch.
Now, in iOS 13 and watchOS 6, both apps are installed straight from the App Store directly on the relevant device, each device installs its own app. This applies to all apps in the store today. iOS app no longer has the Watch app bundled inside, it no longer counts towards your iOS app cellular download limit if you don't need it.
This also enables asset/variant thinning for Watch apps – if you have a Series 4 watch, only Series 4 assets are downloaded to the watch (previously the iOS app had to include all variants in the bundled Watch app for any possible watches).
All current apps belong to the category of “dependent apps”, i.e. the Watch app depends on the iOS app. If you install a dependent app on the Watch, the iPhone will automatically install the matching companion iOS app. (Watch app launch is blocked until the iOS app is installed.)
On the other hand, independent apps can live without their iOS counterpart installed. They are backwards-compatible with earlier OSes.
→ to make an app independent, check the checkbox “Supports Running Without iOS App Installation”
Watch-only apps – apps that do not even have an iOS counterpart – are also possible, they require watchOS 6.
Debugging in the simulator is now up to 10x faster, on the device up to 2x faster
Added text field control (WKInterfaceTextField
) to let you implement sign in forms
Use WKAlertAction
for terms & conditions
Sign In With Apple button (AuthenticationServices
, WKInterfaceAuthorizationAppleIDButton
)
Continuity keyboard for Watch ⭤ iOS – you can e.g. enter passwords to log in on the watch using your iOS device
For proper handling of logging in, set textContentType
and associated domains
Getting health authorization is now also supported on watchOS
Watch is now a standalone push target, you can send user-visible notifications and background notifications straight to the watch
New APNs request header – apns-push-type
: set to alert
for user-visible notifications, and background
for background notifications
→ required for watchOS
Notification service extension support for e.g. decrypting notifications
Complication pushes can also be sent straight to the watch (PushKit)
Networking: use URLSession
, CloudKit
- make sure to use background sessions
- full
CKSubscription
/ CloudKit notifications support
It’s preferred to use URLSession
than WatchConnectivity
- WC is still available for any iOS-to-watchOS specific communication, but only use it if you really need to
- check
isCompanionAppInstalled