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