0

I'm working on an app that requires step counting. There are several devices that don't support this feature (for example in my iPad mini 2, CMPedometer.isStepCountingAvailable() returns false).

Since the app heavily relies on the pedometer, I'd like to make it unavailable to download for unsupported devices.

I would expect to find a pedometer-related entry in the documentation of UIRequiredDeviceCapabilities, but there is none.

Is this possible in any way?

phi
  • 10,634
  • 6
  • 53
  • 88
  • 1
    There isn't actually a "pedometer" in a device. Your _app_ is the "pedometer"! What the device has is an accelerometer and a gyroscope, and these are used by Core Motion's motion processor to deduce from certain forms of regular motion that the user is stepping. So it might suffice to block on those. – matt Nov 24 '20 at 16:33
  • But I should add that Apple doesn't really want you using the required device capabilities this way. They would prefer that, if your app discovers that capabilities that it needs are missing, it should just fail gracefully at runtime. – matt Nov 24 '20 at 16:35
  • Thank you for your comment, it was very useful! – phi Nov 29 '20 at 20:14

1 Answers1

0

No, it is not possible to make an app unavailable for download on the basis of CMPedometer.isStepCountingAvailable(). The preferred method would be to display a notice to the user once downloaded, that their device does not support the required functionality.

user14664032
  • 140
  • 1
  • 10