Prevent user from installing my app if capability

2019-07-15 11:31发布

问题:

I working on an app and its primary need is auto focus camera. How can I prevent users to install this app if they don't have an auto focus camera?

回答1:

well if you really want to prevent users from installing your app if they don't have a autofocus camera then you can add "UIRequiredDeviceCapabilities" key in your info.plist file and can add "auto-focus-camera" value to it. for more info you can visit my blog entry - http://www.makebetterthings.com/blogs/iphone/how-to-prevent-apps-to-being-installed-on-wrong-or-incapable-devices/



回答2:

You need the UIRequiredDeviceCapabilities key of your Info.plist (see Apple's documentation); specifically, the capability auto-focus-camera.



回答3:

You need to add a UIRequiredDeviceCapabilities key to your Info.plist file. That key is a dictionary; you need it to contain auto-focus-camera set to true.

<key>UIRequiredDeviceCapabilities</key>
<dict>
    <key>auto-focus-camera</key>
    <true/>
</dict>

See the full list of capabilities and more details.



回答4:

Check out the UIRequiredDeviceCapabilities key in your Info.plist file. If you include "auto-focus-camera" as one of the items in that array, the app shouldn't install unless the device has that capability.

Have fun!