Xcodebuild fails with invalid option '-exportFormat'

Hi,

Bitrise Build Issue Report template

Description of the issue

build started failing after switching to using Xcode 9.0.

This project is written in swift.
This is an example of a failing build:

The error I get is:

Using legacy export
[08:35:47] xcodebuild "-exportArchive" "-exportFormat" "ipa" "-archivePath" "/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/__archive__301127048/Sparky.xcarchive" "-exportPath" "/Users/vagrant/deploy/Sparky.ipa" "-exportProvisioningProfile" "Sparky Beta Distribution"
xcodebuild: error: invalid option '-exportFormat'

I have already updated the xcode build setup with the instructions here: https://blog.bitrise.io/new-export-options-plist-in-xcode-9
These steps seemed to have fixed the problems I had building another app written in objective-c but not for this app.

Environment:

Where did the issue happen?
Xcode 9.0.x, on macOS 10.12 (Sierra) (pre-installed tools)

Which build Step causes the issue and which version of the step?

xcode-archive@2.3.7

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : NO Not using caches at all
  • If you have multiple different build configurations (workflows), does the issue affect all/more than one? : All build configurations.
  • If it’s an issue which happens sporadically, what’s the frequency? (e.g. Once a day ; about x% of the builds) :100%
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? :After started using xcode 9.0 stacks

Any thoughts?

Thanks,

Leto

Hey @lbaxevanaki!

We’ll have a look into this asap.

Thanks for reporting!

1 Like

@tamaspapik I have updated using your template. I hope this helps.
Thank you!

1 Like

Any updates on this issue?

Thanks,

Leto

Sorry for the delay. Not yet but trying to get there asap!

So, the issue is related to that you are using legacy export, however it is not supported in xcode 9 anymore

Thank you !!!
In the xcode-archive@2.3.7 step in the “Deprecated” section, the “Use deprecated ipa export method? (required)” it was “yes” and now I set it to “no”.
It works now.
Thanks again,

Leto

2 Likes