Prevent an iPhone app from being installed on a device that does not have required hardware or capability
-
28-02-2021 - |
سؤال
I suddenly came up with a scenario and would be keen to know if we can do it. Suppose I am using gyroscope APIs and we all know gyroscopes are available in iPhone 4 and above but not below that I am aware of two things
- Conditional compilation of code using macros
- Conditional linking of frameworks
But my question is : is it possible to do some changes in app configurations or while uploading app to app store so it does not install in lower configuration devices at all.
Please enlighten me on this.
Regards Ankit
المحلول
Adding gyroscope
to the UIRequiredDeviceCapabilities
key into your info.plist
file should prevent users from installing the app if they do not have a gyro on their device.
Your can also find more options and keys like this one here :
http://developer.apple.com/library/ios/#documentation/general/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html