xcodebuild -exportArchive: exportOptionsPlist error for key 'method': expected one of {}

前端 未结 8 1339
被撕碎了的回忆
被撕碎了的回忆 2020-12-28 12:23

I\'m using command line xcodebuild tool to export ad-hoc distribution ipa file out of my archive like this:

xcodebuild -exportArchive -archivePath /path/Arch         


        
相关标签:
8条回答
  • 2020-12-28 13:06

    https://developer.apple.com/library/content/technotes/tn2215/_index.html#//apple_ref/doc/uid/DTS40011221-CH1-PROJ

    Check the following reasons:

    • Your archive contains header files.
    • Your archive contains static libraries or frameworks.
    0 讨论(0)
  • 2020-12-28 13:11

    I had this issue in one of my projects. After updating Cocoapods from 0.38.2 to 0.39.0 it was gone.

    Also, I had a different related issue. Exporting was failing with the following error:

    2015-10-22 17:16:12.568 xcodebuild[91172:2171408] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/_l/2rl169m16p717gzldvh7n0600000gq/T/MyDriveEU_2015-10-22_17-16-12.568.xcdistributionlogs'.
    2015-10-22 17:16:12.860 xcodebuild[91172:2171408] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7fbc13f0c970>: Error Domain=IDEDistributionErrorDomain Code=1 "The operation couldn’t be completed. (IDEDistributionErrorDomain error 1.)"
    error: exportArchive: The operation couldn’t be completed. (IDEDistributionErrorDomain error 1.)
    
    Error Domain=IDEDistributionErrorDomain Code=1 "The operation couldn’t be completed. (IDEDistributionErrorDomain error 1.)"
    
    ** EXPORT FAILED **
    

    It turned out that xcodebuild didn't like teamID parameter I added to the exportOptions.plist. After I removed it, the app was exported successfully.

    0 讨论(0)
  • 2020-12-28 13:11

    I had the same issue since two days, The issue came from Apple certificates. Delete Apple Worldwide Developer Relations certification Authority from your keychain (would be expired at 14 Feb) and so renew it by download :

    https://developer.apple.com/news/?id=02092016a

    0 讨论(0)
  • 2020-12-28 13:12

    This forum helped me to fix the issue.
    https://forums.developer.apple.com/message/59201#59201

    SOLUTION: change the key from 'method' to 'export_method' in the exportOptionsPlist.

    0 讨论(0)
  • 2020-12-28 13:17

    Pavel P's solution was

    In my case one of my static libs did not have Skip Install enabled and this resulted in the same problem. When I set in xcode Skip Install to Yes for that project I fixed that problem.

    Along the same vein, I was calling "xcodebuild" and passing in SKIP_INSTALL=NO as an option.

    e.g.,

    xcodebuild clean analyze archive -workspace MyWorkspace.xcworkspace -scheme MyScheme -configuration Debug SKIP_INSTALL=NO -archivePath /MyPath/MyArchive.xcarchive
    

    Removing SKIP_INSTALL=NO in this case fixed my particular situation.

    0 讨论(0)
  • 2020-12-28 13:21

    I suspected xcodebuild tool initially, but it turned out the archive file was invaid. When I opened the archive file in Xcode and tried to export an ipa file manually, I noticed that "Upload to App Store" and "Validate" buttons were disabled. After clicking the "Export" button, it gave me two options: "Save Built Products" and "Export as an Xcode Archive", but there was no Export ad-hoc distribution and the other regular options.

    It turned out there were few library files along my .app file in the archive. Xcode considers this a generic archive and not an app archive. Check the Build Phases in your project settings for copying header and library files.

    For more details, see https://developer.apple. com/library/ios/technotes/tn2215/_index.html

    0 讨论(0)
提交回复
热议问题