【问题标题】:Not able to create IPA using xcodebuild command through jenkins shell script无法通过 jenkins shell 脚本使用 xcodebuild 命令创建 IPA
【发布时间】:2018-06-19 22:30:25
【问题描述】:

我正在尝试在 Jenkins 上使用以下命令创建 IPA 文件

xcodebuild -exportArchive -archivePath export/MySampleApp.xcarchive -exportPath export/ -exportOptionsPlist export/export_options.plist

但它给了我错误

    + xcodebuild -exportArchive -archivePath export/MySampleApp.xcarchive -exportPath export/ -exportOptionsPlist export/export_options.plist
2018-06-19 19:16:07.324 xcodebuild[81214:2060182] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/y5/1qdx7j6j2tdb1j6g3vvg_xww0000gn/T/MySampleApp_2018-06-19_19-16-07.323.xcdistributionlogs'.
2018-06-19 19:17:20.872 xcodebuild[81214:2060182] [MT] IDEDistribution: Step failed: <IDEDistributionPackagingStep: 0x7ff2b080be50>: Error Domain=IDEDistributionPipelineErrorDomain Code=0 "Code signing "libswiftCore.dylib" failed." UserInfo={NSLocalizedDescription=Code signing "libswiftCore.dylib" failed., NSLocalizedRecoverySuggestion=View distribution logs for more information.}
error: exportArchive: Code signing "libswiftCore.dylib" failed.

Error Domain=IDEDistributionPipelineErrorDomain Code=0 "Code signing "libswiftCore.dylib" failed." UserInfo={NSLocalizedDescription=Code signing "libswiftCore.dylib" failed., NSLocalizedRecoverySuggestion=View distribution logs for more information.}

    ** EXPORT FAILED **

我能够使用以下命令创建存档文件

xcodebuild -scheme "MySampleApp" -sdk iphoneos -target MySampleApp -destination "generic/platform=iOS" -archivePath export/MySampleApp.xcarchive archive DEVELOPMENT_TEAM="QPG8EMUULT" PROVISIONING_PROFILE="efb8da47-3b87-4880-82e8-4967167bb2d3" CODE_SIGNING_REQUIRED=NO

谁能告诉我可能是什么问题?

【问题讨论】:

    标签: ios xcode shell jenkins


    【解决方案1】:

    Keychain 被锁定在 Jenkins 服务器上,这就是它无法进行代码签名的原因。

    xcodebuild 命令之前用下面的命令解锁它

    security unlock-keychain -p yourPassword
    

    现在它运行良好。

    【讨论】:

      【解决方案2】:

      我遇到了这个问题:

      • xcodebuild archive 使用 Xcode 10
      • xcode-select 到 Xcode 9
      • 尝试运行xcodebuild -exportArchive

      所以我 xcode-select 到 Xcode 10 并解决了问题

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-12-03
        • 1970-01-01
        • 1970-01-01
        • 2015-01-07
        • 2017-07-12
        • 1970-01-01
        相关资源
        最近更新 更多