仅iPhone 4应用程序? [英] iPhone 4 only app?

查看:102
本文介绍了仅iPhone 4应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将应用程序限制为只能在iPhone 4上运行?我知道您可以拥有一个仅限iPad的应用程序.在iTunes Connect中,您曾经可以指示仅iPhone应用程序.但是现在在iTunes Connect中,它说将一个应用程序限制为某些设备,可以使用Info.plist.有人在Info.plist中建议是否需要将FrontFacingCamera限制在iPhone 4上的FrontFacingCamera?这是将应用程序限制为仅在iPhone 4上运行的方式吗?

Is it possible to restrict an app to only run on an iPhone 4? I know you can have an iPad only app. And in iTunes Connect you used to be able to indicate an iPhone only app. But now in iTunes Connect it says that to restrict an app to certain devices one can use the Info.plist. Someone suggested that in the Info.plist if a FrontFacingCamera is required that would restrict it to iPhone 4. Is this the way to restrict an app to run on only on an iPhone 4?

推荐答案

现在,您可以测试[UIScreen mainScreen].scale属性.截止目前,只有iPhone 4会在该属性中返回"2".

Right now, you can test the [UIScreen mainScreen].scale property. As of right this moment, only an iPhone 4 will return a "2" in that property.

如果您似乎在未指定的硬件上运行,则可以在AppDelegate和腹痛中适当地进行检查.请记住,如果下一个iPad配备视网膜显示屏(或者iPod Touch Steve无疑将在下周宣布),那么该财产对他们来说也将是"2".但是,也许没关系-如果您要支持iPhone 4,也许还应该支持新的iPod Touch?如果这确实与屏幕密度有关,那么您应该测试屏幕密度,而不要测试其他可以识别设备的密度.

You could check that out in your AppDelegate and bellyache appropriately if it appears you're running on unders-spec'ed hardware. Just bear in mind that if the next iPad gets a retina display (or the iPod Touch Steve will almost undoubtedly be announcing next week), that property will be "2" for them as well. But maybe that's ok--if you're supporting the iPhone 4 maybe the new iPod Touch should be supported as well? If it's really about the screen density, then you should test the screen density, not whatever else you can find to identify the device.

这篇关于仅iPhone 4应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆