xcode 即使所有配置文件都在正确的文件夹中,xcodebuild 代码签名错误配置文件

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

xcodebuild code sign error provisioning profile even though all profiles are in correct folder

iosxcodexcodebuild

提问by kevinl

I have a build server that checks out my xcode projects but there are a couple of issues. I need to build the app if the checkout occurs, but I'm not commiting the .xcworkspace file since more than one person works on the project.

我有一个构建服务器来检查我的 xcode 项目,但有几个问题。如果发生结帐,我需要构建应用程序,但我不会提交 .xcworkspace 文件,因为有不止一个人在处理该项目。

I'm running the following code in my terminal from the project's directory:

我在我的终端中从项目目录运行以下代码:

sudo xcodebuild -configuration Debug

It eventually fails with the error:

它最终失败并出现错误:

Code Sign error: Provisioning profile '7DXXX-XXXX-XXXX....' can't be found

I opened my directory at:

我在以下位置打开了我的目录:

~/Library/MobileDevice/Provisioning\Profiles/

The profile is definitely there, the certificate is correct, and my debug build does not code sign.

配置文件肯定在那里,证书是正确的,我的调试版本没有代码签名。

Any thoughts? Thank you.

有什么想法吗?谢谢你。

回答by rakmoh

Look for provision profile id in the profilename.mobileprovision file. Open the file and search for UUID to find this, it will be in XXX-XXX-XXXX format. Pass this as the value of PROVISIONING_PROFILE in xcodebuild command

在 profilename.mobileprovision 文件中查找供应配置文件 ID。打开文件并搜索 UUID 以找到它,它将是 XXX-XXX-XXXX 格式。将此作为 xcodebuild 命令中 PROVISIONING_PROFILE 的值传递

sudo xcodebuild -configuration Debug PROVISIONING_PROFILE=<Provisioning Profile Id>

回答by ahznsgxb17

if you have the correct certificate,and have imported it. do : sudo xcodebuild -configuration Debug PROVISIONING_PROFILE=""

如果您有正确的证书,并且已经导入。做:sudo xcodebuild -configuration Debug PROVISIONING_PROFILE=""

回答by Radu

It's because you run as root. The provisioning profile is installed for your specific user....

这是因为您以root身份运行。为您的特定用户安装了配置文件....