I have an iOS app where I have some settings in the iOS app related to the watch. I only want to show them if the user has an Apple Watch that's compatible with my app.
In WatchConnectivity I can query WCSession's isPaired property to see if the user has a watch but I can't figure out how to determine the watchOS version (it needs to be >5.0 to use my app).
Is there a way to determine the watchOS version from the iOS app?
If the settings only apply if the user has your watch app installed, you probably just want to check that directly using WCSession
s isWatchAppInstalled
property.
Things get much trickier if you want to get the paired watch's OS version regardless of whether your app is installed. If the user runs the watch app, you could just grab the version on the watch side and send it over (with updateApplicationContext(_:)
). Otherwise, there's no way that I know of to get the watchOS version -- and that kind of makes sense. From a platform security perspective, if the user hasn't installed your app then the details of their watch are kind of none of your business.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With