开发者

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

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 de开发者_开发问答vice 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?


You might want to look into UIRequiredDeviceCapabilities.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜