iosxcodebuildipa

No .ipa file after running xcodebuild -exportArchive using XCode 16.2


I try to generate an .ipa file from the command line using XCode 16.2.

I have successfully created a .xcarchive file, yet when I execute the following command:

xcodebuild \
    -exportArchive \
    -archivePath ${BUILDDIR}/${PROJECT_NAME}.xcarchive \
    -exportOptionsPlist ./ExportOptions.plist \
    -exportPath ${XCODE_EXPORT_PATH} \
    -allowProvisioningUpdates

no .ipa file is generated in (existing) XCODE_EXPORT_PATH directory - only ExportOptions.plist and DistributionSummary.plist files and Packaging.log file.

In ${XCODE_EXPORT_PATH}/Packaging.log file I can see "[MT] Processing step: IDEDistributionCreateIPAStep" followed by execution of ditto command which should copy some file(s) to /var/folders/xr/.../XCodeDistPipeline.../Packages/${PROJECT_NAME}.ipa file; there are no errors.

Here is my ExportOptions.plist file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>compileBitcode</key>
        <false/>
    <key>destination</key>
        <string>export</string>
    <key>manifest</key>
    <dict>
        <key>appURL</key>
                <string>$AWS_BUCKET/MyApp.ipa</string>
        <key>displayImageURL</key>
                <string>$AWS_BUCKET/Image.png</string>
        <key>fullSizeImageURL</key>
                <string>$AWS_BUCKET/Image.png</string>
    </dict>
    <key>method</key>
        <string>debugging</string>
    <key>signingStyle</key>
        <string>automatic</string>
    <key>stripSwiftSymbols</key>
        <true/>
    <key>teamID</key>
        <string>MY_TEAM_ID</string>
    <key>thinning</key>
        <string>&lt;none&gt;</string>
</dict>
</plist>

Where can I find that file or what to do to actually generate it?


Solution

  • You will get IPA file at same path which is defined in command in Xcode 16.2.

    This is my command which i am using in terminal to export IPA. You will get IPA at -exportPath.

    xcodebuild -exportArchive -archivePath "$archieve_path" -exportPath "$IPA_Export_Path" -exportOptionsPlist "$plist_Path" -allowProvisioningUpdates
    

    Also in my case i am using this ExportOptions.plist as i need IPA to upload in testflight.

    <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
            <key>compileBitcode</key>
            <true/>
            <key>method</key>
            <string>app-store-connect</string>
            <key>signingStyle</key>
            <string>automatic</string>
            <key>stripSwiftSymbols</key>
            <true/>
            <key>teamID</key>
            <string>TEAM_ID</string>
            <key>thinning</key>
            <string>&lt;none&gt;</string>
        </dict>
        </plist>
    

    Also, please confirm that you are able to export the IPA using Xcode. If you can export the IPA, then follow these steps:

    Once the IPA is exported, check the ExportOptions.plist file generated by Xcode and use the same file when you use the command.

    Let me know if you are still encountering issues with this.