简体   繁体   English

在Apple商店中禁用iPhone 4s的应用程序

[英]Disable apps for iPhone 4s in apple store

I want my apps to be available for phones above 4s ie iPhone 5,6 and iPad. 我希望我的应用程序可用于4s以上的手机,即iPhone 5,6和iPad。 How can i disable app store to make it available for iPhone 4s. 如何禁用应用商店以使其适用于iPhone 4s。 It asks me to put iPhone 4s and the app is not made for its screens. 它要求我把iPhone 4s和应用程序不是为它的屏幕。

You can't explicitly set a list of devices compatible with your app. 您无法明确设置与您的应用兼容的设备列表。 Some well-knows games explicitly writes the list of compatibles devices right in the beginning of the description text from the App Store. 一些众所周知的游戏明确地在App Store的描述文本的开头写下兼容设备列表。

Example taken from The Room Three app store page : 从Room Three app store页面获取的示例:

WARNING: DUE TO HEAVY GRAPHICS REQUIREMENTS, THE ROOM THREE IS NOT COMPATIBLE WITH IPAD 1, IPHONE 4 (& OLDER IPHONES) OR IPOD TOUCH 4TH GEN (& OLDER IPODS) 警告:由于严重的图形要求,房间三与IPAD 1,IPHONE 4(和旧的IPHONES)或IPOD触摸第4代(和旧的IPODS)不兼容


There is still a way to restrict the app to some devices using some special iOS Keys on the .plist file. 仍然有一种方法可以使用.plist文件中的某些特殊iOS密钥将应用程序限制为某些设备。

UIDeviceFamily : This key is added automatically by Xcode and represents the hardware on which this app is designed to run : iPhone/iPod touch or iPad. UIDeviceFamily:此密钥由Xcode自动添加,代表此应用程序运行的硬件:iPhone / iPod touch或iPad。 You can set it according to build settings. 您可以根据构建设置进行设置。

UIRequiredDeviceCapabilities : This key is much more useful since it allows you to restrict the app according to the Device capabilities. UIRequiredDeviceCapabilities:此密钥更有用,因为它允许您根据设备功能限制应用程序。 If you don't mind losing iPhone 5 and 5C users (since their devices are no longer produced) you can set the key arm64 which means that your app is compiled only for the arm64 instruction set, and thus will work only on iPhone 5s and later devices (and this even if your app work fine in armv7). 如果您不介意丢失iPhone 5和5C用户(因为他们的设备不再生产),您可以设置关键arm64 ,这意味着您的应用程序仅针对arm64指令集进行编译,因此仅适用于iPhone 5s和以后的设备(即使你的应用程序在armv7中工作正常)

Unfortunality, you can't do this. 不幸的是,你做不到这一点。 If I were you, i would check screen size in applicationDidFinishLaunching method then if device is iPhone 4s, i would show an AlertView and explain the user. 如果我是你,我会在applicationDidFinishLaunching方法中检查屏幕大小然后如果设备是iPhone 4s,我会显示一个AlertView并解释用户。 This might be the best way to do this approach. 这可能是采用这种方法的最佳方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM