Jenkins Xcode插件的iOS构建失败

时间:2019-05-10 07:04:37

标签: ios xcode jenkins continuous-integration

我不是iOS专家,但是使用Xcode插件构建了用React Native编写的iOS应用。

我遇到以下错误,我已经尝试了stackoverflow和其他博客/文章中提到的所有解决方案。我在钥匙串中有证书。没有一种解决方案对我有用。

Signing Identity:     "iPhone Developer: XXXXX (YYYYYY)"
Provisioning Profile: "iOS Team Provisioning Profile: com.xxx.xxx.mobile"
                      (xxxxxxxxxx)

    /usr/bin/codesign --force --sign xxxxxxxxxxxxxxxxxxxxxxxxx --entitlements /Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/MYPROJECT-fxxxxxxxxxxxxxxxxxxxxxxxx/Build/Intermediates.noindex/ArchiveIntermediates/MYPROJECT/IntermediateBuildFilesPath/MYPROJECT.build/Debug-iphoneos/MYPROJECT.build/MYPROJECT.app.xcent --timestamp=none /Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/MYPROJECT-fxxxxxxxxxxxxxxxxxxxxxxxx/Build/Intermediates.noindex/ArchiveIntermediates/MYPROJECT/InstallationBuildProductsLocation/Applications/MYPROJECT.app
/Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/MYPROJECT-fxxxxxxxxxxxxxxxxxxxxxxxx/Build/Intermediates.noindex/ArchiveIntermediates/MYPROJECT/InstallationBuildProductsLocation/Applications/MYPROJECT.app: errSecInternalComponent
Command /usr/bin/codesign failed with exit code 1

** ARCHIVE FAILED **


The following commands produced analyzer issues:
    Analyze Base/RCTModuleMethod.mm normal arm64
    Analyze RCTNetInfo.m normal arm64
(2 commands with analyzer issues)

The following build commands failed:
    CodeSign /Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/MYPROJECT-fxxxxxxxxxxxxxxxxxxxxxxxx/Build/Intermediates.noindex/ArchiveIntermediates/MYPROJECT/InstallationBuildProductsLocation/Applications/MYPROJECT.app
(1 failure)

Jenkins:2.164.2

Xcode集成插件:2.0.11

Xcode:10.2

1 个答案:

答案 0 :(得分:0)

如果Jenkins在后台使用launchctl等运行,则Jenkins在哪个帐户上运行?您需要小心。

即使Jenkins在您的帐户下运行,如果您使用launchctl等在后台运行,也需要使用security命令将对访问在后台运行的会话的钥匙串的访问权限授予。

或者您需要使用Xcode插件选项来解锁钥匙串。

推荐的方法是在构建之前使用Xcode插件开发人员配置文件导入从Xcode导出的开发人员证书,私钥和配置文件。