当我尝试存档以提交 iOS 应用程序时,出现冲突的配置设置错误

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

I get conflicting provisioning settings error when I try to archive to submit an iOS app

iosxcode

提问by vanagar

Now I'm trying to Product>Archive my iOS app to submit. However, I am getting following errors:

现在我正在尝试产品>归档我的 iOS 应用程序以提交。但是,我收到以下错误:

AppName has conflicting provisioning settings. AppName is automatically signed for development, but a conflicting code signing identity iPhone Distribution has been manually specified. Set the code signing identity value to iPhone Developerin the build settings editor, or switch to manual signing in the project editor.`

Code signing is required for product type 'Application' in SDK 'iOS 10.1'`

AppName 具有冲突的配置设置。AppName 为开发自动签名,但手动指定了冲突的代码签名标识 iPhone Distribution。iPhone Developer在构建设置编辑器中将代码签名标识值设置为 ,或在项目编辑器中切换到手动签名。`

SDK“iOS 10.1”中的产品类型“应用程序”需要代码签名

The situation won't change even those I've retry a whole process to recreate iOS certificates or provisioning profile.

即使我重试整个过程来重新创建 iOS 证书或配置文件,情况也不会改变。

I was setting as iOS Distributionin TARGETS > Code Signing Identity > Release > Any iOS SDK. When I changed the setting as iOS Developerhere, and changed the setting in PROJECTS > Code Signing Identity > Release > Any iOS SDKas iOS Distribution, I've succeeded in archiving. I'm wondering is it necessary to set as iOS Distributionin the target editor or not. And if it's mandatory, please someone let me know how can I work around this error.

我设置为iOS DistributionTARGETS > Code Signing Identity > Release > Any iOS SDK。当我在iOS Developer这里更改设置,并在PROJECTS > Code Signing Identity > Release > Any iOS SDKas 中更改设置时iOS Distribution,我已成功存档。我想知道是否有必要iOS Distribution在目标编辑器中设置为。如果这是强制性的,请有人告诉我如何解决此错误。

My XCode version is 8.1.

我的 XCode 版本是 8.1。

回答by Erin Geyer

I had this same error, but I had already checked "Automatically manage signing".

我有同样的错误,但我已经选中了“自动管理签名”。

The solution was to uncheck it, then check it again and reselect the Team. Xcode then fixed whatever was causing the issue on its own.

解决方案是取消选中它,然后再次选中它并重新选择团队。然后,Xcode 自行修复了导致问题的任何原因。

回答by Led Machine

I had the same problem, I noticed that If you want to make a release of your iOs app and publish it on the App Store you don't need at all to put in the "Code Signing Identity" as release, just keep it as iOs developer.

我遇到了同样的问题,我注意到如果您想发布您的 iOs 应用程序并将其发布在 App Store 上,您根本不需要将“代码签名标识”作为发布版放入,只需将其保留为iOS 开发者。

Go to Your project -> Build Settings -> Code Signing Identity and put everything to iOs developer.

转到您的项目 -> 构建设置 -> 代码签名标识并将所有内容交给 iOs 开发人员。

enter image description here

在此处输入图片说明

回答by Charlie Ang

For those coming from Ionic or Cordova, you can try the following:

对于那些来自 Ionic 或 Cordova 的人,您可以尝试以下操作:

Open the file yourproject/platforms/ios/cordova/build-release.xcconfigand change from this:

打开文件yourproject/platforms/ios/cordova/build-release.xcconfig并从这里更改:

CODE_SIGN_IDENTITY = iPhone Distribution
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Distribution

into this:

进入这个:

CODE_SIGN_IDENTITY = iPhone Developer
CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer

and try to run the ios cordova build ios --releaseagain to compile a release build.

并尝试ios cordova build ios --release再次运行以编译发布版本。

Reference: https://forum.ionicframework.com/t/ios-build-release-error-is-automatically-signed-for-development-but-a-conflicting-code-signing-identity-iphone-distribution-has-been-manually-specified/100633/7

参考:https: //forum.ionicframework.com/t/ios-build-release-error-is-automatically-signed-for-development-but-a-conflicting-code-signing-identity-iphone-distribution-has-已手动指定/100633/7

回答by matt

You are way over-thinking this. The process is vastly improved and extremely easy in Xcode 8. Take advantage of that fact.

你想太多了。这个过程在 Xcode 8 中得到了极大的改进并且非常简单。利用这个事实。

Step One: Do not, in any way, shape, or form, attempt to set the Code Signing settings in the Build Settings. Don't go near them. You will absolutely mess this up. Instead, edit the target and do all the work in the General pane. Best approach: set yourself up for automatic code signing - just enter your Team and check the checkbox, like this:

第一步:不要以任何方式、形状或形式尝试在构建设置中设置代码签名设置。不要靠近他们。你绝对会把这搞砸。相反,编辑目标并在“常规”窗格中完成所有工作。最佳方法:为自己设置自动代码签名 - 只需输入您的团队并选中复选框,如下所示:

enter image description here

在此处输入图片说明

Step Two: Make sure you have an iOS Distribution Identity (Certificate). You can check this under Xcode Preferences > Accounts, View Details. It would also be a good idea at this time to go to the member center and get yourself an App Store mobile provision for this app, and download and install it.

第二步:确保您拥有 iOS 分发标识(证书)。您可以在 Xcode Preferences > Accounts, View Details 下进行检查。这个时候最好去会员中心为自己准备一个 App Store 移动版这个应用程序,然后下载并安装它。

Step Three: Choose "Generic iOS Device" as your Destination, and choose Product > Archive. The app will be compiled, the archive is created, and you are now ready to submit to the App Store.

第三步:选择“通用iOS设备”作为您的目的地,然后选择产品>存档。将编译应用程序,创建存档,您现在可以提交到 App Store。

回答by atereshkov

If you get this error

如果您收到此错误

App has conflicting provisioning settings. App is automatically signed, but provisioning profile 'ID' has been manually specified. Set the provisioning profile value to "Automatic" in the build settings editor, or switch to manual signing in the project editor.

应用程序具有冲突的配置设置。应用已自动签名,但已手动指定配置文件“ID”。在构建设置编辑器中将配置文件值设置为“自动”,或在项目编辑器中切换到手动签名。

then make surethat you have empty PROVISIONING_PROFILEoption in TargetBuildSettings:

然后确保Target Build Settings 中有空的PROVISIONING_PROFILE选项:

enter image description here

在此处输入图片说明

回答by Rein rPavi

Don't forget to do this,

不要忘记这样做,

Select the Project -- > Build Settings. Search PROVISIONING_PROFILE and delete whatever nonsense is there.

选择项目 --> 构建设置。搜索 PROVISIONING_PROFILE 并删除那里的任何废话。

回答by George Huang

If you are from Ionic world. You might get a "conflict code signing" error when you in the "archive" stage, as below:

如果您来自 Ionic 世界。在“归档”阶段,您可能会收到“冲突代码签名”错误,如下所示:

... is automatically signed for development, but a conflicting code signing identity iPhone Distribution has been manually specified. Set the code signing identity value to "iPhone Developer" in the build settings editor, or switch to manual signing in the project editor. Code signing is required for product type 'Application' in SDK 'iOS 10.x'

... 为开发自动签名,但手动指定了冲突的代码签名身份 iPhone Distribution。在构建设置编辑器中将代码签名标识值设置为“iPhone Developer”,或者在项目编辑器中切换到手动签名。SDK“iOS 10.x”中的产品类型“应用程序”需要代码签名

In this case, please go to Build Settings/under signing, code signing identity, and select both as iOS Developer, not Distribution.

在这种情况下,请转到构建设置/签名下,代码签名身份,并将两者都选择为 iOS 开发人员,而不是分发。

Go to the menu: Product/Archive again, then the issue will be fixed.

再次转到菜单:产品/存档,然后问题将得到解决。

回答by Petru

For those coming from Ionic or Cordova, you can try the following: Disconnect your ios devices from the computer before ios cordova build ios --release(seems to change the targeted device for xcode signing).

对于那些来自 Ionic 或 Cordova 的人,您可以尝试以下操作: 之前断开 ios 设备与计算机的连接ios cordova build ios --release(似乎更改了 xcode 签名的目标设备)。

回答by catanore

Go to build settings, search for code signing identity, and set Any iOS SDK value for iOS Developer:

进入构建设置,搜索代码签名标识,并为 iOS Developer 设置 Any iOS SDK 值:

enter image description here

在此处输入图片说明

回答by Gaby Fitcal

The only solution worked for me:

唯一的解决方案对我有用:

  1. Close Xcode project
  2. Using finder go to project folder
  3. Right click on .xcodeproj and choose "Show Package Contents"
  4. Right click on project.pbxproj go on "Open With" and choose TextEdit
  5. Now search for your Provision Profile instanceId specified in the error message.
  6. Delete all found texts and let Provisioning Profiles clean.
  7. Save & Close
  8. Open Xcode
  9. Enable automatically manage signing
  1. 关闭 Xcode 项目
  2. 使用 finder 转到项目文件夹
  3. 右键单击 .xcodeproj 并选择“显示包内容”
  4. 右键单击 project.pbxproj 继续“打开方式”并选择 TextEdit
  5. 现在搜索错误消息中指定的 Provision Profile instanceId。
  6. 删除所有找到的文本并清理 Provisioning Profiles。
  7. 保存并关闭
  8. 打开 Xcode
  9. 启用自动管理签名

Enjoy! Hope it will be useful!

享受!希望它会很有用!