简体   繁体   English

Xcode 3.2的代码签名错误

[英]Code sign error with Xcode 3.2

I had a fully working build environment before upgrading to iPhone OS 3.1 and Xcode 3.2. 在升级到iPhone OS 3.1和Xcode 3.2之前,我有一个完全正常工作的构建环境。 Now when I try to do a build, I get the following: 现在,当我尝试进行构建时,我得到以下内容:

Code Sign error: Provisioning profile 'FooApp test' specifies the Application Identifier 'no.fooapp.iphoneapp' which doesn't match the current setting 'TGECMYZ3VK.no.fooapp.iphoneapp' 代码签名错误:供应配置文件'FooApp test'指定应用程序标识符'no.fooapp.iphoneapp',它与当前设置'TGECMYZ3VK.no.fooapp.iphoneapp'不匹配

The problem is that Xcode somehow manages to think that the "FooApp Test" provisioning profile specifies the Application Identifier "no.fooapp.iphoneapp", but this is not the case. 问题是Xcode以某种方式设法认为“FooApp Test”配置文件指定了应用程序标识符“no.fooapp.iphoneapp”,但事实并非如此。

In the Organizer (and in the iPhone developer portal website) the app identifier is correctly seen as 'TGECMYZ3VK.no.fooapp.iphoneapp'. 在管理器(以及iPhone开发人员门户网站)中,应用程序标识符被正确地视为“TGECMYZ3VK.no.fooapp.iphoneapp”。

Also, when setting the provisioning profile in the build options at the project level, Xcode correctly identifies the app identifier, but when I go to the target, I'm unable to select any valid provisioning profile. 此外,在项目级别的构建选项中设置供应配置文件时,Xcode会正确识别应用程序标识符,但是当我转到目标时,我无法选择任何有效的供应配置文件。

What could be causing this problem? 什么可能导致这个问题?

Update: I've tried to create a new provisioning profile, but still no luck. 更新:我试图创建一个新的配置文件,但仍然没有运气。 I also tried simply changing the app identified in Info.plist to just "no.fooapp.iphoneapp". 我还尝试将Info.plist中标识的应用程序更改为“no.fooapp.iphoneapp”。 The build succeeds, but now I get an error from the Organizer: 构建成功,但现在我收到组织者的错误:

The executable was signed with invalid entitlements. 可执行文件使用无效的权利进行签名。 The entitlements specified in your application's Code Signing Entitlements file do not match those specified in your provisioning profile. 应用程序的代码签名权利文件中指定的权利与您的供应配置文件中指定的权利不匹配。 (0xE8008016). (0xE8008016)。

This seems reasonable, as the provisioning profile still has the "TGECMYZ3VK.no.fooapp.iphoneapp" application identifier. 这似乎是合理的,因为配置文件仍然具有“TGECMYZ3VK.no.fooapp.iphoneapp”应用程序标识符。

I also double checked that all certiicates are valid in the Keychain. 我还仔细检查了所有证书在钥匙串中的有效性。

So my question is how I can get Xcode to see the correct application identifier? 所以我的问题是如何让Xcode看到正确的应用程序标识符?

UPDATE: As noted below, what seems to fix the problem is deleting all provisioning profiles, certificates, etc., making new certificates / profiles and installing them again. 更新:如下所述,似乎解决了问题的是删除所有配置文件,证书等,制作新证书/配置文件并重新安装它们。 If anyone has any other solutions, they would be welcome. 如果有人有任何其他解决方案,他们将是受欢迎的。 :) :)

I had to manually remove the provisioning profiles from my phone, then rebuild the apps after doing a "clean all targets" from the build menu. 我不得不从手机中手动删除配置文件,然后在构建菜单中执行“清理所有目标”后重建应用程序。

That's under Settings -> General -> Profiles 这是在设置 - >常规 - >配置文件下

This happened to me when I got a new Mac. 当我买到一台新Mac时,这发生在我身上。 You'll fix it, don't worry 你会解决它,不要担心

Well, as seems to be the case with a lot of these code signing issues, deleting all provisioning profiles, certificates, etc. and revoking and generating everything all over again turned out to do the trick. 好吧,就像许多这些代码签名问题的情况一样,删除所有配置文件,证书等,并且再次撤销和生成所有内容,结果证明了这一点。 I even created a new bundle identifier, app identifier, etc., and now AdHoc distribution is working again. 我甚至创建了一个新的包标识符,应用程序标识符等,现在AdHoc发行版再次运行。

I had this same error yesterday. 我昨天也遇到了同样的错误。 I tried all of the various resetting procedures in the other answers with no luck. 我在其他答案中尝试了所有各种重置程序而没有运气。 Eventually I also 最后我也是

  • rebooted my mac 重新启动我的mac
  • rebooted my iPhone 重启了我的iPhone
  • deleted all of my iphone provisioning profiles from the phone using XCode 使用XCode从手机中删除了我的所有iphone配置文件
  • deleted all profiles from my mac (~/Library/MobileDevice/Provisioning Profiles for me) 从我的mac中删除了所有配置文件(〜/ Library / MobileDevice / Provisioning Profiles for me)
  • what else? 还有什么? deleted build folder, restarted XCode, installed update to 3.1.2 sdk, sacrificed a chicken. 删除build文件夹,重启XCode,安装更新到3.1.2 sdk,牺牲了一只鸡。

Lo and behold, it now works, the error is gone. 瞧,它现在有效,错误消失了。 This is serious voodoo territory. 这是严重的伏都教领域。

此外,请确保在项目配置CODE_SIGN_ENTITLEMENTS中添加了对权利文件名“dist.plist”的引用。

检查构建目标和主应用程序的信息中的代码签名权利 - 如果代码签名权利在任何一个上都说明,则将其删除

In XCode, in the "Groups & Files" pane, expand "Targets" and double-click on your app's target. 在XCode的“组和文件”窗格中,展开“目标”,然后双击应用程序的目标。

This will bring up the Info pane for your target. 这将打开目标的“信息”窗格。 In the "Build" section, check the "code signing" section for any old profiles. 在“构建”部分中,检查任何旧配置文件的“代码签名”部分。 This has happened to me many times particularly after an upgrade to a new version of the sdk and iphone os 这种情况多次发生在我身上,特别是在升级到新版本的sdk和iphone操作系统之后

Quick Hack if you are on Xcode 4.3. 如果您使用的是Xcode 4.3,请快速破解。

In Xcode under Project Settings > MyTarget > Summary tab all the way in the bottom there is a checkbox that says "Enable entitlements". 项目设置> MyTarget>摘要选项卡下的Xcode中,底部有一个复选框,显示“启用权利”。 When I unchecked it, it made the error go away. 当我取消选中它时,它会使错误消失。

After being stumped by this for quite a while I revisited the settings and discovered that I had reversed the 'Code Signing Identity' and the 'Any iPhone OS Device' entries. 在被这个困难了一段时间后,我重新访问了设置并发现我已经颠倒了“代码签名身份”和“任何iPhone OS设备”条目。 - The clue I had as to this happening was shown by. - 关于这件事发生的线索显示了。

  1. Deleting every profile off the phone 删除手机上的每个配置文件
  2. Build and Go 建立和去

At this point xcode attempts to provision the phone (device) 此时xcode尝试配置手机(设备)

  1. Examine the phone to see which provisioning profile has been added. 检查手机以查看添加了哪个配置文件。

As I prefix all my profiles 'AdHoc' or 'Development' or 'AppStore' I saw immediately that the install process was putting a development profile on the device and not an AdHoc profile. 当我为我的所有配置文件“AdHoc”或“开发”或“AppStore”添加前缀时,我立即看到安装过程在设备上放置了开发配置文件,而不是AdHoc配置文件。

Inside Resources/Entitlements.plist there is a Boolean "get-task-allow" if that is not checked, check it ON. 在Resources / Entitlements.plist内部有一个布尔“get-task-allow”如果没有选中,请将其检查为ON。 This fixed the issue for me. 这为我解决了这个问题。

The device may not be in the list. 设备可能不在列表中。 Try modify your provisioning profile. 尝试修改您的配置文件。

Just to add a note here: I encountered the same error (0xE8008016) after replacing my Macbook's logic board (although I imagine you'd have the same problem on a completely new mac), and after hours of going around in circles I realised that the iPhone Developer Program Portal had separate certificates for Development and Distribution . 只是在这里添加一个注释:我在更换我的Macbook的逻辑板后遇到了同样的错误(0xE8008016)(虽然我想你在一个全新的Mac上遇到了同样的问题),经过几个小时的圈子后,我意识到iPhone开发人员计划门户网站拥有独立的开发分发证书。

A change in hardware means you need to reissue both certificates - I'd reissued Developer but not Distribution. 硬件的变化意味着您需要重新颁发两个证书 - 我重新发布了Developer而不是 Distribution。 Because my name hadn't changed when my hardware did (and certificates are identified by the owner's name), this made it a tricky problem to spot ;) Hope this saves someone else my frustration. 因为我的硬件没有改变我的名字(并且证书是由所有者的名字识别的),这使得发现它成为一个棘手的问题;)希望这可以节省别人的挫折感。

另一个原因是您要安装的设备不是分发证书中的已批准设备。

作为参考,我遇到了同样的问题并删除了我的所有配置文件,现有的证书以及本地驱动器和开发人员门户网站上的所有内容,删除现有设备并重新添加它们(开发人员门户网站)似乎可以解决问题。

The problem is in the "project.pbxproj" file located inside the [your project].xcodeproject file. 问题出在[your project] .xcodeproject文件中的“project.pbxproj”文件中。 If you feel brave right click on the .xcodeproject and view contents then open "project.pbxproj" with a plan text editor. 如果您觉得勇敢,请右键单击.xcodeproject并查看内容,然后使用计划文本编辑器打开“project.pbxproj”。 Inside search for the offensive path and correct it. 在里面搜索进攻路径并纠正它。 In my case I just removed the entire path and just left "Entitlements.plist" and it cleard my issues up. 在我的情况下,我只是删除了整个路径,只是离开了“Entitlements.plist”,它清除了我的问题。 I STRONGLY reccomend backing up your .xcodeproject before attempting this. 我强烈建议您在尝试之前备份.xcodeproject。

Double click the target then select the "Properties" tab. 双击目标,然后选择“属性”选项卡。 There change the com.yourcompany.${...} . 更改了com.yourcompany.${...}

Sometimes Xcode does not automatically copy your provisioning profile to the right location. 有时,Xcode不会自动将您的配置文件复制到正确的位置。 In my case, that was true. 在我的情况下,这是真的。

Check that your provisioning profile is in ~/Library/MobileDevice/Provisioning Profiles directory and if not just drag and drop, clean and build 检查您的配置文件是否在〜/ Library / MobileDevice / Provisioning Profiles目录中,如果不是只是拖放,清理和构建

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM