Target iPhone application by model (e.g. 3G vs 3GS)

二次信任 提交于 2019-12-12 10:37:57

问题


Much like the required device capabilities on the info.plist file, is it possible to configure an application such that it will only be available on some device models?

I know how to target it by device family (iPhone&iPod vs iPad), but in this case I'm looking to target by model. I also know how to programmatically determine the model, but what I want is for iTunes to prevent some device models from being able to download an app, which is why doing it via info.plist seems like it would be the best way.

For instance, if I wanted an app to be available on iPhone 3GS (or iPhone/iPod 4) and upper but NOT on iPhone 3G, is there any way to do it?


回答1:


There is no way to do it, except in code. Apple discourages it, instead asking you to require specific features instead of specific models.

The best you can do is note in the product description that not all features are available/performant on the 3G hardware, for example, and then disable those features in code or let them run poorly.




回答2:


You might want to look into UIRequiredDeviceCapabilities.




回答3:


Put armv7 in the UIRequiredDeviceCapabilities of the app's info.plist. That will prevent an app from loading on an iPhone 3G, which uses the armv6 processor architecture.



来源:https://stackoverflow.com/questions/4268560/target-iphone-application-by-model-e-g-3g-vs-3gs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!