bitrise-steplib / steps-export-xcarchive

MIT License
0 stars 6 forks source link

Fails to export app clip #55

Open jacobsapps opened 1 month ago

jacobsapps commented 1 month ago

Troubleshooting

Issue description

After much trial and error with certificates and provisioning profiles, I was able to get this step to successfully export an ad-hoc build for our app clip. I ensured the export-options was identical to the plist I got when manually exporting from Xcode.

The step successfully exports the app clips from the archive, but then fails to locate the IPA.

I ran the raw xcodebuild command locally with the same export options, and it worked perfectly. It created this folder:

The Apps/ folder contained each thinned .ipa variant.

Here is the command I'm running in bitrise.yml:

      - export-xcarchive@4:
          title: Export App Clip
          inputs:
            - product: app-clip
            - automatic_code_signing: api-key
            - distribution_method: ad-hoc
            - archive_path: $BITRISE_XCARCHIVE_PATH
            - export_options_plist_content: |- 
            # ... 

Bitrise info

$ xcodebuild "-exportArchive" "-archivePath" "/var/folders/7l/rszmbrmd6tv4pg52z6ql_5rc0000gn/T/xcodeArchive2300144774/Staging.xcarchive" "-exportPath" "/var/folders/7l/rszmbrmd6tv4pg52z6ql_5rc0000gn/T/__export__4258332065" "-exportOptionsPlist" "/Users/[REDACTED]/deploy/export_options.plist"
2024-07-25 08:04:38.355 xcodebuild[30628:113960] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path "/var/folders/7l/rszmbrmd6tv4pg52z6ql_5rc0000gn/T/LapseApp_2024-07-25_08-04-38.353.xcdistributionlogs".
Exported LapseApp to: /var/folders/7l/rszmbrmd6tv4pg52z6ql_5rc0000gn/T/__export__4258332065
** EXPORT SUCCEEDED **
no ipa found with pattern: /var/folders/7l/rszmbrmd6tv4pg52z6ql_5rc0000gn/T/__export__4258332065/*.ipa

The line with the error is here in your source code.

I suspect that the pattern matching for an .ipa file isn't accounting for the .ipa living in subfolders, which could be why it's not working.

jacobsapps commented 1 month ago

Update: I could get this working via a script, running the xcodebuild command directly. The files are certainly being produced, just not detected by .../*/.ipa