xcode 如何针对旧版本的 iOS SDK 构建 Xamarin

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

How build Xamarin against older version of iOS SDK

iosxcodexamarinxamarin.iosxamarin.forms

提问by Steve Chadbourne

I'm trying to build my Xamarin Forms app for the Apple store using Xamarin Studio on my MacBook. This worked fine until recently.

我正在尝试在我的 MacBook 上使用 Xamarin Studio 为 Apple 商店构建我的 Xamarin Forms 应用程序。直到最近,这都运行良好。

The only options available to me on the SDK version dropdown on the iOS Build tab are Default and 8.3. If I build using either of these and try to upload to the store I get the following error:

在 iOS 构建选项卡上的 SDK 版本下拉列表中,我唯一可用的选项是 Default 和8.3。如果我使用其中任何一个构建并尝试上传到商店,我会收到以下错误:

ERROR ITMS-90068: "This bundle is invalid. The value provided for the key MinimumOSVersion '8.3' is not acceptable."

错误 ITMS-90068:“此捆绑包无效。为密钥 MinimumOSVersion '8.3' 提供的值不可接受。”

I guess this is due to updating all Xamarin and Xcode components to their latest versions recently.

我猜这是由于最近将所有 Xamarin 和 Xcode 组件更新到最新版本。

I'm trying to figure out how to get the 8.2 SDK back.

我想弄清楚如何取回 8.2 SDK。

I tried downloading the iOS 8.2 Simulatorfrom Xcode > Preferences > Downloadsbut that doesn't seem to have added anything in the Xamarin SDK version dropdown.

我尝试从中下载iOS 8.2 模拟器Xcode > Preferences > Downloads但这似乎没有在 Xamarin SDK 版本下拉列表中添加任何内容。

Any ideas?

有任何想法吗?

回答by Rolf Bjarne Kvinge

You're confusing the SDK version used to build your app with and the minimum iOS version your app requires.

您混淆了用于构建您的应用程序的 SDK 版本和您的应用程序所需的最低 iOS 版本。

It's perfectly possible to build an app using the iOS 8.3 SDK and target iOS 5.1.1 for instance.

例如,完全可以使用 iOS 8.3 SDK 构建应用程序并针对 iOS 5.1.1。

You need to set the minimum iOS version for your app instead of changing the SDK version; this is done in the project's iOS Application options, by setting Deployment Targetto your app's minimum iOS version.

您需要为您的应用设置最低 iOS 版本,而不是更改 SDK 版本;这是在项目的 iOS 应用程序选项中通过设置Deployment Target为您的应用程序的最低 iOS 版本来完成的。

回答by A-Sharabiani

This is what I did to resolve the issue:

这是我为解决问题所做的工作:

  • Right click on the .iOSproject > Options
  • Set Build > iOS Build > Link behaviourto Link Framework SDKs Only.
  • 右键单击.iOS项目>选项
  • 设置Build > iOS Build > Link behaviourLink Framework SDKs Only