Xcode 持续集成配置文件错误

Xcode 持续集成配置文件错误

问题描述:

我正在尝试在 Mavericks 上的 Xcode 5 中设置持续集成.如果我有一个机器人进行一个新的干净项目构建,它会毫无错误地完成.如果我让机器人在我的实际项目上进行构建,我会收到以下错误:

I am trying to setup continuous integration in Xcode 5 on Mavericks. If I have a bot do a new clean project build, it completes with no errors. If I have the bot do the build on my actual project, I get the following error:

未找到匹配的配置文件:您的构建设置指定了一个带有 UUID 的配置文件XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",然而,没有这样的配置个人资料找到了.CodeSign 错误:代码签名是必需的SDKiOS 7.0"中的产品类型应用程序"

No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", however, no such provisioning profile was found. CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.0'

如果我在服务器机器上提取最新的源代码并在服务器上构建/归档它,它会按预期工作.所有预期的证书和公钥都包含在钥匙串中.我尝试更新项目中的所有配置文件设置并构建方案指向的目标.有没有人知道如何解决这个错误?

If I pull latest source on the server machine and build/archive it on the server it works as expected. All expected certificates and public keys are included in keychain. I have tried to update all provisioning profile settings in the project and build target the scheme points at. Does anyone have any ideas how to resolve this error?

破解打开项目文件并查看 UUID 后,据我所知,它无法找到的配置文件的 UUID 确实存在.也许这是构建无法访问配置文件或钥匙串证书的某种权限问题?

After cracking open the project file and looking at the UUID, from what I can tell the UUID for the provisioning file it can't find does exist. Perhaps this is some kind of permission issue with the build not having access to the profile or keychain certificate?

我遇到了同样的问题,最后设法让它起作用.

I had the same problem and finally managed to make it work.

首先,我将我的服务器添加到我的开发团队,但我遇到了和你一样的错误.

First of all, I added my server to my developer team but I had the same error as you.

然后我将我的密钥从 user keychain 复制到 system keychain,如下所示 这里 但还是不够.

Then I copied my key from user keychain to system keychain as indicated here but it was still not enough.

最后,我将配置文件从 ~/Library/MobileDevice/Provisioning\ Profiles/ 复制到 /Library/MobileDevice/Provisioning\ Profiles/(实际上我复制了所有的 MobileDevice 目录,因为它不存在).

And finally, I copied the provisioning profiles from ~/Library/MobileDevice/Provisioning\ Profiles/ to /Library/MobileDevice/Provisioning\ Profiles/ (in fact I copied all the MobileDevice directory because it didn't exist).

现在,我有一个有效的持续集成,为我提供了一个 ipa,我可以在我的 Mac 上下载它或在我的设备上无线安装.

And now, I have a working continuous integration giving me an ipa which I can download on my Mac or install over the air on my devices.

我不知道为什么我必须这样做,但我希望它也适用于您.

I don't know why I had to do this, but I hope it will work for you too.