在 XCode 中设置最低 iOS 版本

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

Setting the Minimum iOS version in XCode

iosxcodeapp-store-connectcocoonjs

提问by JamesR

I'm fairly new to Xcode as I use CocoonJS to build my HTML5 iPhone game but I want to know how to correctlyset the minimum iOS version. I've set my deployment target to 8.0 and did a clean and then a build but when I submit to the app store it says the minimum iOS version is 6.0.

我对 Xcode 还很陌生,因为我使用 CocoonJS 来构建我的 HTML5 iPhone 游戏,但我想知道如何正确设置最低 iOS 版本。我已将部署目标设置为 8.0 并进行了清理,然后进行了构建,但是当我提交到应用商店时,它说最低 iOS 版本是 6.0。

The next thing I tried was manually updating this value in the info.PListbut then I get an invalid binary in iTunes Connect saying

我尝试的下一件事是手动更新 info.PList 中的这个值,但是我在 iTunes Connect 中得到一个无效的二进制文件说

Minimum OS Version Mismatch - The minimum OS version (LC_VERSION_MIN_IPHONEOS) in the binary ('6.0') for architecture ('armv7') differs from the MinimumOSVersion ('8.0') in the Info.plist

最低操作系统版本不匹配 - 体系结构 ('armv7') 的二进制文件 ('6.0') 中的最低操作系统版本 (LC_VERSION_MIN_IPHONEOS) 与 Info.plist 中的 MinimumOSVersion ('8.0') 不同

How do I update the minimum iOS version correctly without screwing up my binary? I've checked other threads but they all just say to update just the deployment target. Thanks

如何在不搞砸二进制文件的情况下正确更新最低 iOS 版本?我检查了其他线程,但他们都只是说只更新部署目标。谢谢

回答by Claus J?rgensen

Assuming you're building against the 8.x SDK, and you have set the deployment target to 8.x or higher, that'll be enough.

假设您正在针对 8.x SDK 进行构建,并且您已将部署目标设置为 8.x 或更高版本,这就足够了。

However, I'd imagine you set the deployment target the wrong place in Xcode. You'll need to set it under your Projectand not under your Target. Alternatively, if you have a .xcconfigfile, you can change it by setting

但是,我想您在 Xcode 中将部署目标设置在错误的位置。您需要将它设置在您的Project而不是您的Target 下。或者,如果你有一个.xcconfig文件,你可以通过设置来更改它

IPHONEOS_DEPLOYMENT_TARGET = 8.1

If you don't have a .xcconfig, you can verify the deployment target, by opening your project.pbxprojfile, and search for IPHONEOS_DEPLOYMENT_TARGET, and check if it's set to your expected value.

如果您没有.xcconfig,则可以通过打开project.pbxproj文件并搜索来验证部署目标IPHONEOS_DEPLOYMENT_TARGET,并检查它是否设置为您的预期值。