尝试在 Jenkins 上构建 Xcode 工作区时出现以下错误
usr/bin/codesign --force --sign B5E96BDFADAF51D771B158A29BF1D16565215A2D --preserve-metadata=identifier,entitlements '/Users/servicebuild/Desktop/Jenkins/workspace/Hello-Branch/build/Hello Test.app/Frameworks/Alamofire.framework' 16:06:07 /Users/servicebuild/Desktop/Jenkins/workspace/Hello-Branch/build/Hello Test.app/Frameworks/Alamofire.framework: unknown error -1=ffffffffffffffff 16:06:07 Command /bin/sh failed with exit code 1 16:06:07 16:06:07 ** BUILD FAILED ** 16:06:07 16:06:07 16:06:07 The following build commands failed: 16:06:07 PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/servicebuild/Library/Developer/Xcode/DerivedData/Hello-dcvxwbnovymfusbrvfyyekingznu/Build/Intermediates.noindex/Garanti\ Filo.build/Release-iphoneos/Hello\ Hello\ Test.build/Script-2617FEF7DE193736656550249B.sh
我有多个目标,我创建的工作区方案目标被勾选为共享(不是 pod 目标)。在 pod 项目中,每个框架都有“不要代码签名”(默认)。我可以成功地从 Xcode 导出 IPA。但是,当我尝试在 Jenkins 中构建时,出现此错误。
我在下面的帖子中尝试了解决方案,但无法弄清楚。我认为问题在于 Jenkins 在不需要时强制签署 Pod。
最佳答案
我想出了如何运行下面的代码(发布在我的问题中添加的帖子中)并且它有效。重要的一点是为钥匙串(keychain)和密码提供正确的路径。否则,它不起作用。
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k password ${KEYCHAIN}
关于ios - Jenkins 在使用 Cocoapods 构建 Xcode 项目时返回 "unknown error -1=ffffffffffffffff",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49257408/