Xcode 9.2存档成功但无法导出IPA

时间:2018-02-06 18:02:11

标签: ios xcode jenkins

我正在尝试为AdhocProd持续集成企业IOS Build。使用以下命令进行构建和存档。

构建命令:

    /usr/bin/xcodebuild -workspace "Project.xcworkspace" -scheme 
    "ProjectiOSPROD" -archivePath build/ProjectiOS -configuration Release 
    archive CODE_SIGN_STYLE=Manual 
   PROVISIONING_PROFILE=”CompanyNameProdAdhocDistribution” 
   CODE_SIGNING_IDENTITY="iPhone Developer: Build Machine(XXXXXX)" 
    PRODUCT_BUNDLE_IDENTIFIER="com.Companyname.prod.ProjectiOS"

输出: **存档成功**

导出命令:

/usr/bin/xcodebuild -exportArchive -archivePath "build/ProjectiOS.xcarchive" -exportPath "build/ProjectiOS.ipa" -exportOptionsPlist"../../ExportOptions.plist"

此Plist是从xcode IDE获取的ExportOptions.Plist。并将其用于詹金斯工作空间

输出:

error: exportArchive: SDWebImage.framework does not support provisioning profiles.

Error Domain=IDEProvisioningErrorDomain Code=10 "SDWebImage.framework does not support provisioning profiles." UserInfo={NSLocalizedDescription=SDWebImage.framework does not support provisioning profiles., NSLocalizedRecoverySuggestion=SDWebImage.framework does not support provisioning profiles, but provisioning profile CompanyNameProdAdhocDistribution has been manually specified. Remove this item from the "provisioningProfiles" dictionary in your Export Options property list.}

error: exportArchive: Stripe.framework does not support provisioning profiles.

Error Domain=IDEProvisioningErrorDomain Code=10 "Stripe.framework does not support provisioning profiles." UserInfo={NSLocalizedDescription=Stripe.framework does not support provisioning profiles., NSLocalizedRecoverySuggestion=Stripe.framework does not support provisioning profiles, but provisioning profile CompanyNameProdAdhocDistribution has been manually specified. Remove this item from the "provisioningProfiles" dictionary in your Export Options property list.}

provisioningProfiles字典已存在于“属性”列表中。如果我删除它,则说将其添加到属性列表。

任何建议都会受到极大的赞赏。

1 个答案:

答案 0 :(得分:0)

  • 您必须使用Xcode9.2手动生成和导出IPA。这将在导出的文件夹中创建文件名ExportOptions.plist。
  • 将该文件复制到工作区根文件夹。
  • 在Execute shell中写下以下命令。

    xcodebuild -exportArchive -archivePath ${WORKSPACE}/build/YourProject.xcarchive -exportPath ${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_NUMBER}/archive -exportOptionsPlist ${WORKSPACE}/ExportOptions.plist