Reputation: 69
If I only want my application to run on certain iPhone/iPad models, is it appropriate to specify for instance that my app needs ARKit to achieve this even if my app does not actually use anything from ARKit?
Is there another way to go about this? Also, even after making this change, my app still builds for devices it shouldn’t like the iPhone 5s simulator. Is the device restriction a change that occurs only on the app store?
Upvotes: 0
Views: 3324
Reputation: 9484
UIRequiredDeviceCapabilities
lets you declare the hardware or specific capabilities that your app needs in order to run.
UIRequiredDeviceCapabilities
can be used as a dictionary in Info.plist with a capability as key and its value as YES/NO.
It does not seem to have any impact on simulators but when run on a device it although compiles but shows a prompt and does not run:
It looks like you can use a capability to restrict the device even if you are not actually using that capability in code anywhere.
Apple has mentioned here that AppStore uses this key to prevent users from installing the app.
Also, we can not use this key to restrict any device in a update. It looks like any intended restriction needs to be included in the first app version:
Important: All device requirement changes must be made when you submit an update to your binary. You are permitted only to expand your device requirements. Submitting an update to your binary to restrict your device requirements is not permitted. You are unable to restrict device requirements because this action will keep customers who have previously downloaded your app from running new updates.
EDIT:
https://developer.apple.com/library/content/qa/qa1397/_index.html
Upvotes: 6