限制在某些 iOS 目标设备上进行 App Store 提交
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10191657/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Restrict to certain iOS target devices for App Store submission
提问by Zebedee Pedersen
I've had an iTunes App Store submission bounce back because of problems running on iPhone 4 hardware.
由于在 iPhone 4 硬件上运行出现问题,我的 iTunes App Store 提交被退回。
Basically, the app is written to farm all networking activity off to a background thread so that the UI doesn't lock up while it's waiting for the server to respond on slow (cellular) data connection. This works fine on dual-core devices like the iPad 2 + iPhone 4S, but causes slow response times and errors on older, single-core hardware like the iPad/iPhone 4.
基本上,该应用程序被编写为将所有网络活动转移到后台线程,以便 UI 在等待服务器响应慢速(蜂窝)数据连接时不会锁定。这在 iPad 2 + iPhone 4S 等双核设备上运行良好,但在 iPad/iPhone 4 等较旧的单核硬件上会导致响应时间缓慢和错误。
I did include notes to that effect in my submission, but I wondered if there was a formal way to restrict the target device in iTunes Connect?
我确实在我的提交中包含了这种效果的注释,但我想知道是否有正式的方法来限制 iTunes Connect 中的目标设备?
Cheers!
干杯!
采纳答案by Alan MacGregor
Unfortunately not at the moment, there is a list of options available for you to restrict the user from purchasing the app but nothing for restricting due to the cores
不幸的是,目前还没有,您可以使用一系列选项来限制用户购买应用程序,但由于内核的原因没有任何限制
列表:http: //developer.apple.com/library/ios/#documentation/general/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html
回答by Molotoff
Actually, there might be a way:
实际上,可能有一种方法:
Adding an item to UIRequiredDeviceCapabilities
in your Info.plist
with the requirement of bluetooth-le
should limit your app to iPhone 4S/5 and iPad 3, 4 and mini.
You could also throw in a camera-flash
requirement to limit the app to iPhones only, should you need that.
将项目添加到UIRequiredDeviceCapabilities
您Info.plist
的要求bluetooth-le
应将您的应用程序限制为 iPhone 4S/5 和 iPad 3、4 和 mini。如果camera-flash
需要,您还可以要求将应用程序限制为仅限 iPhone。
请参阅设备兼容性矩阵
回答by Adi
I just found the following when looking into it - this should help you submit and approved by Apple as it is the guidelines from Apple.
我刚刚在调查时发现了以下内容 - 这应该可以帮助您提交并获得 Apple 的批准,因为它是 Apple 的指导方针。
Device Compatibility
设备兼容性
The information property list (Info.plist) file contains critical information about your app's configuration and must be included in your app bundle. Every new project you create in Xcode has a default Info.plist file configured with some basic information about your project. You can modify this file to specify additional configuration details for your app.
信息属性列表 (Info.plist) 文件包含有关您的应用程序配置的关键信息,并且必须包含在您的应用程序包中。您在 Xcode 中创建的每个新项目都有一个默认的 Info.plist 文件,其中配置了有关您项目的一些基本信息。您可以修改此文件以指定应用程序的其他配置详细信息。
The UIRequiredDeviceCapabilities key lets you declare the hardware or specific capabilities that your app needs in order to run. All apps are required to have this key in their Info.plist file. The App Store uses the contents of this key to prevent users from downloading your app onto a device that cannot possibly run it. The tables in this chapter show all iOS devices and their capabilities.
UIRequiredDeviceCapabilities 键可让您声明应用程序运行所需的硬件或特定功能。所有应用程序都必须在其 Info.plist 文件中包含此密钥。App Store 使用此密钥的内容来防止用户将您的应用下载到不可能运行它的设备上。本章中的表格显示了所有 iOS 设备及其功能。
Hope it helped.
希望它有所帮助。
回答by Haroldo Gondim
You can only restrict your app for iPhone
or iPad
in the project settings, restricting also in publishing in the App Store
.
只能限制你的应用程序进行iPhone
或iPad
在项目设置,也制约了在出版App Store
。
See where you can set the type.
查看您可以在哪里设置类型。
To restrict the some model like iPhone 4/4s
you should do this programmatically getting the size and redirecting to some ViewController
informing that your app is no supported in this model.
要限制某些模型,iPhone 4/4s
您应该以编程方式执行此操作,获取大小并重定向到某些ViewController
通知该模型不支持您的应用程序。
See here how get the screen size.
请参阅此处如何获取屏幕尺寸。
CGSize result = [[UIScreen mainScreen] bounds].size;
switch ((int) result.height) {
case 480:
NSLog(@"iPhone 4 / 4s");
break;
case 568:
NSLog(@"iPhone 5 / 5c / 5s");
break;
case 667:
NSLog(@"iPhone 6 / 6s");
break;
case 736:
NSLog(@"iPhone 6+ / 6s+");
break;
default:
NSLog(@"Other screen size, could be an iPad or new device model.");
break;
}
Is important to remember that Apple wants the maximum possible support for your apps and not support for a specific model can reject your app. But if you only no support the iPhone 4/4s
you probably will publish as usual. First of all try to adapt your code to use auto-layout, only if is not possible you restrict by some device model.
重要的是要记住,Apple 希望为您的应用程序提供最大可能的支持,而不支持特定型号可能会拒绝您的应用程序。但如果你只是不支持iPhone 4/4s
你可能会像往常一样发布。首先,尝试调整您的代码以使用自动布局,只有在您受某些设备型号限制时才可能。
I have a published app and restrict for iPhone 4s
. It is approved as usal.
我有一个已发布的应用程序并限制iPhone 4s
. 它被批准为正常。