防止 iPhone 应用程序安装在不具备所需硬件或功能的设备上
我突然想到了一个场景,很想知道我们是否可以做到。 假设我正在使用陀螺仪 API,并且我们都知道陀螺仪在 iPhone 4 及更高版本中可用,但不能低于我知道两件事
- 使用宏条件编译代码
- 框架的条件链接
但我的问题是:是否可以进行一些更改在应用程序配置中或将应用程序上传到应用程序商店时,因此它根本不会安装在较低配置的设备中。
请赐教我这一点。
问候 安基特
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将
gyrscope
添加到info.plist
文件中的UIRequiredDeviceCapability
键应该会阻止用户在设备上没有陀螺仪的情况下安装应用程序。您还可以在这里找到更多选项和键,例如:
http://developer.apple.com/库/ios/#documentation/general/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html
Adding
gyroscope
to theUIRequiredDeviceCapabilities
key into yourinfo.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