3

I'm building a watchOS companion app for a navigation app. It relies on the compass, which was introduced on Apple Watch Series 5. The app is useless without a compass.

I'm familiar with UIRequiredDeviceCapabilities, but that doesn't seem to offer the ability to require a compass.

Is there a best practice for allowing a companion watchOS app to only be installed on Apple Watch devices with a compass?

My alternative is to try to detect a heading and create a message in the app that says something like Apple Watch with compass required if it's not available. I wouldn't mention the Series 5 specifically for future-proofing against other future model names. This seems clunky, though, and it might be a better experience to prevent someone from even installing the app.

gohnjanotis
  • 6,513
  • 6
  • 37
  • 57
  • Can't you fallback to using GPS heading? It won't be as accurate, so maybe you could show an alert to that effect. – Paulw11 Oct 23 '19 at 22:51
  • Yes. As I said in the question I can do that within the app, but I’m wondering if there is a way to only allow the app to be installed on supported devices (devices with a compass) like with `UIRequiredDeviceCapabilities`. – gohnjanotis Oct 23 '19 at 22:59

1 Answers1

0

You could check whether a compass is available using [CLLocationManager.headingAvailable] and show an alert using WKAlertAction to tell the user.

goelectric
  • 320
  • 3
  • 10