Prevent an iPhone app from being installed on a device that does not have required hardware or capability

StackOverflow https://stackoverflow.com/questions/8119544

문제

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

  1. Conditional compilation of code using macros
  2. 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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top