xcode 如何将我的 iOS 项目限制为仅限 iPhone 4

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4718813/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 20:06:16  来源:igfitidea点击:

How can I restrict my iOS Project to iPhone 4 Only

iphonexcodeios

提问by Mike Buckbee

I'm using a barcode scanner library within my iOS project that currently only supports iPhone 4 devices. Is it possible to restrict the application submission so that only iPhone 4 users can load it, is this a cause for rejection from the App Store?

我在当前仅支持 iPhone 4 设备的 iOS 项目中使用条形码扫描仪库。是否可以限制应用程序提交,以便只有 iPhone 4 用户可以加载它,这是 App Store 拒绝的原因吗?

回答by Jeremy Fuller

In your Xcode target configuration, under the Deployment group, change the iOS Deployment Target to the desired version. This will not cause a rejection of your app.

在您的 Xcode 目标配置中,在部署组下,将 iOS 部署目标更改为所需的版本。这不会导致您的应用被拒绝。

Edit: The original question was ambiguous. This answer refers to how to restrict your app to iOS 4.

编辑:原来的问题是模棱两可的。这个答案是指如何将您的应用程序限制为 iOS 4。

回答by donkim

You could try something like:

你可以尝试这样的事情:

<key>UIRequiredDeviceCapabilities</key>
<array>
    <string>gyroscope</string>
</array>

This will restrict it to only iPhones that have the gyroscope, which is iPhone4 and beyond.

这将使其仅限于配备陀螺仪的 iPhone,即 iPhone4 及更高版本。

Not sure this is the bestway, but it should work.

不确定这是最好的方法,但它应该有效。

Hope this helps!

希望这可以帮助!

回答by Ben M.

I would check out the UIRequiredDeviceCapabilitiesin the SDK. It is generally Apple's policy to try to make your app available to all devices. I can't remember off the top of my head if the App store will only show Apps that are made to work on the device or if the App store does a blanket view.

我会查看SDK 中的UIRequiredDeviceCapabilities。通常 Apple 的政策是尝试让您的应用程序可用于所有设备。我一时想不起来 App Store 是否只显示适用于设备的应用程序,或者 App Store 是否提供全面视图。