如何修复iPhone项目的“失败的协同设计验证”?

时间:2022-10-24 00:18:27

Last night, the iPhone project was built perfectly.

昨晚,iPhone项目建得很完美。

This morning, I installed XCode 3.2.3 in a separate folder. When I open the same project in the old XCode 3.2.2 and re-built the project. I got this warning:

今天上午,我在一个单独的文件夹中安装了XCode 3.2.3。当我在旧的XCode 3.2.2中打开相同的项目并重新构建项目时。我收到了警告:

Application failed codesign verification. The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)

应用程序失败的合作设计验证。该签名无效,或者没有与苹果提交证书签署。(-19011)

How can I fix it? Thanks!

我怎样才能修好它呢?谢谢!

13 个解决方案

#1


6  

I had the same problem, seems 3.2.3 messes with codesigning. I fixed it by re-running the 3.2.2 installer, no need to uninstall anything.

我遇到了同样的问题,好像是3。2.3的混乱。我通过重新运行3.2.2安装程序修复了它,不需要卸载任何东西。

#2


27  

For me the following steps resolved the issue:

对我来说,以下步骤解决了这个问题:

  1. Go to Product > Edit Scheme.

    进入产品>编辑方案。

  2. Open the Archive Profile.

    打开存档资料。

  3. Set Build configuration to Distribution.

    将构建配置设置为发行版。

#3


9  

I've encountered the same problem too. It showed that I had a duplicate certificate registration in my keychains. Removing one of them (I removed the one from my system keychain) fixed the problem.

我也遇到过同样的问题。它显示我的密钥链中有一个重复的证书注册。删除其中一个(我从系统密钥链中删除了一个)修复了问题。

Steps that helped me to resolve my problem:

帮助我解决问题的步骤:

  1. Open KeyChain Access application
  2. 打开钥匙链访问应用程序
  3. Select the 'login' keychain, and select in the bottom pane 'Certificates'
  4. 选择“登录”密钥链,并在底部窗格中的“证书”中选择
  5. Switch to the 'system' keychain and see if there are certificates registered in both chains.
  6. 切换到“系统”密钥链,查看两个链中是否都注册了证书。
  7. Remove one of them
  8. 删除其中一个
  9. Rebuild the application
  10. 重建中的应用

#4


5  

The parallel XCode problem can be addressed using the command line tool "xcode-select"

可以使用“XCode -select”命令行工具解决并行XCode问题

I found a similar problem caused by having XCode 4.2 beta installed. One of the embedded entitlements files was being placed in a different directory and was causing a file not found error.

我发现了一个类似的问题,因为安装了XCode 4.2测试版。其中一个嵌入的授权文件被放置在另一个目录中,导致文件没有找到错误。

The solution was to use xcode-select to verify and fix the XCode path.

解决方案是使用XCode -select来验证和修复XCode路径。

#5


4  

Besides googling for possible solutions to this problem and trying them out (hoping that they help), here is an advice how to diagnose what causes this. The steps below apply to Xcode 4.2.

除了在google上搜索可能的解决方案并尝试他们(希望他们能提供帮助),这里有一个建议,如何诊断是什么导致了这个问题。下面的步骤适用于Xcode 4.2。

  1. In menu, select View > Navigators > Show Log Navigator. The Log Navigator should be displayed on the left side.
  2. 在菜单中,选择查看>导航器>显示日志导航器。日志导航器应该显示在左边。
  3. In the list of builds, select the one that causes troubles. The log from the build will be shown in the main view.
  4. 在构建列表中,选择导致问题的一个。构建的日志将显示在主视图中。
  5. Scroll to the very bottom. The last two steps should be CodeSign and Validate, where the Validate step contains the warning.
  6. 滚动到最底部。最后两个步骤应该是CodeSign和Validate,其中Validate步骤包含警告。
  7. Expand CodeSign and inspect the parameters used to perform the code signing.
  8. 展开CodeSign并检查用于执行代码签名的参数。
  9. Expand Validate to learn more about the errors/warnings.
  10. 展开Validate以了解更多关于错误/警告的信息。

Also scroll up and inspect the heading for the build target:

同时向上滚动并检查构建目标的标题:

Build Target (your build target)

构建目标(您的构建目标)

Project (your project) | Configuration (selected configuration) | Destination ...

项目(您的项目)|配置(选定配置)|目的地…

In my case, I found out that while doing the Archive build, the app was signed with the developer certificate. Inspecting the heading for the build target revealed that the Release configuration was used to build the archive. The remedy was to:

在我的例子中,我发现在进行归档构建时,应用程序与开发人员证书进行了签名。检查构建目标的标题,发现发布配置用于构建归档。补救措施是:

  1. In the menu, select Product > Edit Scheme
  2. 在菜单中,选择产品>编辑方案。
  3. In the Edit Scheme dialog, select the Archive build item (list on the left)
  4. 在“编辑方案”对话框中,选择“归档构建项”(左边的列表)
  5. Change Build Configuration to Distribution
  6. 将构建配置更改为分布

I had this issue after duplicating a build target. The original target was signed by the distribution certificate. However, when copying the target, Xcode decided to assign the Release configuration to the Archive build.

在复制一个构建目标之后,我就有了这个问题。原始目标由分发证书签名。但是,在复制目标时,Xcode决定将发布配置分配给归档构建。

#6


3  

This happened to me today as I was moving an existing project into a new Git repository structure, while simultaneously using a development certificate obtained via being added to my client's team as a "Member". So lots of opportunity for things to screw up.

今天我遇到了这种情况,当时我正在将一个现有的项目转移到一个新的Git存储库结构中,同时使用通过作为“成员”添加到客户机的团队中获得的开发证书。所以有很多机会让事情搞砸。

In my case, the issue turned out to be the "Build Products Path". I had it set to the relative path "../../../build" instead of an absolute path. This was causing the Validate tool to screw up since the actual path wasn't being collapsed properly. I changed it to an absolute path and the Validate tool then began to run successfully once more.

在我的案例中,问题变成了“构建产品路径”。我把它设置成相对路径。/构建“而不是绝对路径”。这导致验证工具出错,因为实际的路径没有完全崩溃。我将它更改为一个绝对路径,然后验证工具开始再次成功运行。

I submitted this as a bug to Radar as #8946204.

我把这个作为错误提交给雷达,编号为#8946204。

#7


3  

This is kind of an old post but I wanted to share what I learned (really remembered because I forgot this part.) I was trying to build my project against an ad-hock profile. I had forgotten that I needed to create a separate App Store profile (Provisioning Portal -> Provisioning -> Distribution). This was my first app I've submitted and the documentation is overwhelming so I missed/forgot about this part. Once I created the App Store profile and installed in XCode everything worked fine. Just wanted to throw this out there in case anyone else has this same issue.

这是一篇很旧的文章,但我想分享我所学到的东西(真正记住是因为我忘记了这一部分。)我试图建立我的项目与一个ad-hock档案。我忘记了我需要创建一个单独的应用程序商店概要文件(供应门户—>供应—>分发)。这是我提交的第一个应用,文档太多了,所以我忘记了这个部分。一旦我创建了App Store概要文件并将其安装到XCode中,一切都运行良好。我只是想把这个扔出去,以防其他人也有同样的问题。

#8


3  

Due to what hiroshi said you can change it there: I just do is:

因为hiroshi说你可以在这里改变它,我只是:

  • Open the Organizer
  • 打开组织者
  • Go to Devices
  • 去设备
  • Provisioning Profile
  • 配置文件
  • Click on the Profile you want to use. There you will see the profile identifier key.
  • 单击要使用的概要文件。在这里,您将看到配置文件标识符键。
  • Open the xcode project via textfile (the file in the xcodepj bundle)
  • 通过textfile (xcodepj包中的文件)打开xcode项目
  • Go to those lines and put the key in here
  • 到这几行,把钥匙放在这里
@@ -325,6 +325,7 @@
                            PREBINDING = NO;
 +                               "PROVISIONING_PROFILE[sdk=iphoneos*]" = "key goes        here";
                            SDKROOT = iphoneos;
 @@ -361,6 +362,7 @@
                            PREBINDING = NO;
 +                               "PROVISIONING_PROFILE[sdk=iphoneos*]" = "and also here";
                            SDKROOT = iphoneos;
  • Save changes and restart the Project
  • 保存更改并重新启动项目

!!!That's what worked for me in XCODE 4!!!

! ! !这就是XCODE 4中对我有用的东西!!!

#9


0  

If you go to the Organizer and select Provisioning Profiles, is the profile listed there? If so, have you checked that it's setting in the Project Settings/Build/Code Signing section?

如果您访问组织者并选择供应配置文件,是否列出了配置文件?如果是,您是否检查过它是否在项目设置/构建/代码签名部分设置?

#10


0  

I'm not sure, but reverting those changes in the project.pbxproj rescues me from failing to start my app in devices. The warning subject of the question remain though.

我不确定,但在项目中恢复这些更改。pbxproj让我无法在设备上启动应用程序。然而,这个问题的警示主题仍然存在。

@@ -325,6 +325,7 @@
                                PREBINDING = NO;
+                               "PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
                                SDKROOT = iphoneos;
@@ -361,6 +362,7 @@
                                PREBINDING = NO;
+                               "PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
                                SDKROOT = iphoneos;

#11


0  

I fixed this simply by deleting my distribution certificate from keychain then downloading it again from the provisional profile

我只是通过从keychain删除我的分发证书,然后从临时配置文件中再次下载它来解决这个问题。

#12


0  

For the build warning or archive validation error "Application failed codesign verification", see Apple's complete list of potential causes at the following URL "How do I resolve the error: Application failed codesign verification?"

对于构建警告或归档验证错误“应用程序失败的codesign验证”,请参见以下URL“如何解决错误:应用程序失败的codesign验证?”

Best,

请接受我最美好的祝愿,

#13


-1  

Simple Solution: Build your app using a DISTRIBUTION certificate and not a Developer cert.

简单的解决方案:使用发布证书而不是开发证书来构建应用程序。

#1


6  

I had the same problem, seems 3.2.3 messes with codesigning. I fixed it by re-running the 3.2.2 installer, no need to uninstall anything.

我遇到了同样的问题,好像是3。2.3的混乱。我通过重新运行3.2.2安装程序修复了它,不需要卸载任何东西。

#2


27  

For me the following steps resolved the issue:

对我来说,以下步骤解决了这个问题:

  1. Go to Product > Edit Scheme.

    进入产品>编辑方案。

  2. Open the Archive Profile.

    打开存档资料。

  3. Set Build configuration to Distribution.

    将构建配置设置为发行版。

#3


9  

I've encountered the same problem too. It showed that I had a duplicate certificate registration in my keychains. Removing one of them (I removed the one from my system keychain) fixed the problem.

我也遇到过同样的问题。它显示我的密钥链中有一个重复的证书注册。删除其中一个(我从系统密钥链中删除了一个)修复了问题。

Steps that helped me to resolve my problem:

帮助我解决问题的步骤:

  1. Open KeyChain Access application
  2. 打开钥匙链访问应用程序
  3. Select the 'login' keychain, and select in the bottom pane 'Certificates'
  4. 选择“登录”密钥链,并在底部窗格中的“证书”中选择
  5. Switch to the 'system' keychain and see if there are certificates registered in both chains.
  6. 切换到“系统”密钥链,查看两个链中是否都注册了证书。
  7. Remove one of them
  8. 删除其中一个
  9. Rebuild the application
  10. 重建中的应用

#4


5  

The parallel XCode problem can be addressed using the command line tool "xcode-select"

可以使用“XCode -select”命令行工具解决并行XCode问题

I found a similar problem caused by having XCode 4.2 beta installed. One of the embedded entitlements files was being placed in a different directory and was causing a file not found error.

我发现了一个类似的问题,因为安装了XCode 4.2测试版。其中一个嵌入的授权文件被放置在另一个目录中,导致文件没有找到错误。

The solution was to use xcode-select to verify and fix the XCode path.

解决方案是使用XCode -select来验证和修复XCode路径。

#5


4  

Besides googling for possible solutions to this problem and trying them out (hoping that they help), here is an advice how to diagnose what causes this. The steps below apply to Xcode 4.2.

除了在google上搜索可能的解决方案并尝试他们(希望他们能提供帮助),这里有一个建议,如何诊断是什么导致了这个问题。下面的步骤适用于Xcode 4.2。

  1. In menu, select View > Navigators > Show Log Navigator. The Log Navigator should be displayed on the left side.
  2. 在菜单中,选择查看>导航器>显示日志导航器。日志导航器应该显示在左边。
  3. In the list of builds, select the one that causes troubles. The log from the build will be shown in the main view.
  4. 在构建列表中,选择导致问题的一个。构建的日志将显示在主视图中。
  5. Scroll to the very bottom. The last two steps should be CodeSign and Validate, where the Validate step contains the warning.
  6. 滚动到最底部。最后两个步骤应该是CodeSign和Validate,其中Validate步骤包含警告。
  7. Expand CodeSign and inspect the parameters used to perform the code signing.
  8. 展开CodeSign并检查用于执行代码签名的参数。
  9. Expand Validate to learn more about the errors/warnings.
  10. 展开Validate以了解更多关于错误/警告的信息。

Also scroll up and inspect the heading for the build target:

同时向上滚动并检查构建目标的标题:

Build Target (your build target)

构建目标(您的构建目标)

Project (your project) | Configuration (selected configuration) | Destination ...

项目(您的项目)|配置(选定配置)|目的地…

In my case, I found out that while doing the Archive build, the app was signed with the developer certificate. Inspecting the heading for the build target revealed that the Release configuration was used to build the archive. The remedy was to:

在我的例子中,我发现在进行归档构建时,应用程序与开发人员证书进行了签名。检查构建目标的标题,发现发布配置用于构建归档。补救措施是:

  1. In the menu, select Product > Edit Scheme
  2. 在菜单中,选择产品>编辑方案。
  3. In the Edit Scheme dialog, select the Archive build item (list on the left)
  4. 在“编辑方案”对话框中,选择“归档构建项”(左边的列表)
  5. Change Build Configuration to Distribution
  6. 将构建配置更改为分布

I had this issue after duplicating a build target. The original target was signed by the distribution certificate. However, when copying the target, Xcode decided to assign the Release configuration to the Archive build.

在复制一个构建目标之后,我就有了这个问题。原始目标由分发证书签名。但是,在复制目标时,Xcode决定将发布配置分配给归档构建。

#6


3  

This happened to me today as I was moving an existing project into a new Git repository structure, while simultaneously using a development certificate obtained via being added to my client's team as a "Member". So lots of opportunity for things to screw up.

今天我遇到了这种情况,当时我正在将一个现有的项目转移到一个新的Git存储库结构中,同时使用通过作为“成员”添加到客户机的团队中获得的开发证书。所以有很多机会让事情搞砸。

In my case, the issue turned out to be the "Build Products Path". I had it set to the relative path "../../../build" instead of an absolute path. This was causing the Validate tool to screw up since the actual path wasn't being collapsed properly. I changed it to an absolute path and the Validate tool then began to run successfully once more.

在我的案例中,问题变成了“构建产品路径”。我把它设置成相对路径。/构建“而不是绝对路径”。这导致验证工具出错,因为实际的路径没有完全崩溃。我将它更改为一个绝对路径,然后验证工具开始再次成功运行。

I submitted this as a bug to Radar as #8946204.

我把这个作为错误提交给雷达,编号为#8946204。

#7


3  

This is kind of an old post but I wanted to share what I learned (really remembered because I forgot this part.) I was trying to build my project against an ad-hock profile. I had forgotten that I needed to create a separate App Store profile (Provisioning Portal -> Provisioning -> Distribution). This was my first app I've submitted and the documentation is overwhelming so I missed/forgot about this part. Once I created the App Store profile and installed in XCode everything worked fine. Just wanted to throw this out there in case anyone else has this same issue.

这是一篇很旧的文章,但我想分享我所学到的东西(真正记住是因为我忘记了这一部分。)我试图建立我的项目与一个ad-hock档案。我忘记了我需要创建一个单独的应用程序商店概要文件(供应门户—>供应—>分发)。这是我提交的第一个应用,文档太多了,所以我忘记了这个部分。一旦我创建了App Store概要文件并将其安装到XCode中,一切都运行良好。我只是想把这个扔出去,以防其他人也有同样的问题。

#8


3  

Due to what hiroshi said you can change it there: I just do is:

因为hiroshi说你可以在这里改变它,我只是:

  • Open the Organizer
  • 打开组织者
  • Go to Devices
  • 去设备
  • Provisioning Profile
  • 配置文件
  • Click on the Profile you want to use. There you will see the profile identifier key.
  • 单击要使用的概要文件。在这里,您将看到配置文件标识符键。
  • Open the xcode project via textfile (the file in the xcodepj bundle)
  • 通过textfile (xcodepj包中的文件)打开xcode项目
  • Go to those lines and put the key in here
  • 到这几行,把钥匙放在这里
@@ -325,6 +325,7 @@
                            PREBINDING = NO;
 +                               "PROVISIONING_PROFILE[sdk=iphoneos*]" = "key goes        here";
                            SDKROOT = iphoneos;
 @@ -361,6 +362,7 @@
                            PREBINDING = NO;
 +                               "PROVISIONING_PROFILE[sdk=iphoneos*]" = "and also here";
                            SDKROOT = iphoneos;
  • Save changes and restart the Project
  • 保存更改并重新启动项目

!!!That's what worked for me in XCODE 4!!!

! ! !这就是XCODE 4中对我有用的东西!!!

#9


0  

If you go to the Organizer and select Provisioning Profiles, is the profile listed there? If so, have you checked that it's setting in the Project Settings/Build/Code Signing section?

如果您访问组织者并选择供应配置文件,是否列出了配置文件?如果是,您是否检查过它是否在项目设置/构建/代码签名部分设置?

#10


0  

I'm not sure, but reverting those changes in the project.pbxproj rescues me from failing to start my app in devices. The warning subject of the question remain though.

我不确定,但在项目中恢复这些更改。pbxproj让我无法在设备上启动应用程序。然而,这个问题的警示主题仍然存在。

@@ -325,6 +325,7 @@
                                PREBINDING = NO;
+                               "PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
                                SDKROOT = iphoneos;
@@ -361,6 +362,7 @@
                                PREBINDING = NO;
+                               "PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
                                SDKROOT = iphoneos;

#11


0  

I fixed this simply by deleting my distribution certificate from keychain then downloading it again from the provisional profile

我只是通过从keychain删除我的分发证书,然后从临时配置文件中再次下载它来解决这个问题。

#12


0  

For the build warning or archive validation error "Application failed codesign verification", see Apple's complete list of potential causes at the following URL "How do I resolve the error: Application failed codesign verification?"

对于构建警告或归档验证错误“应用程序失败的codesign验证”,请参见以下URL“如何解决错误:应用程序失败的codesign验证?”

Best,

请接受我最美好的祝愿,

#13


-1  

Simple Solution: Build your app using a DISTRIBUTION certificate and not a Developer cert.

简单的解决方案:使用发布证书而不是开发证书来构建应用程序。