Wednesday, November 1, 2017

xcodebuild: error: invalid option '-exportFormat'

If you are running  xcodebuild command for generating ipa file,

-exportformat ipa 

is no longer supported.

We need to provide our manual export options plist file(exportOptionsPlist) path to build command If we are doing a manual signing.

  # export options plist path


   # generate IPA

      xcodebuild -exportArchive -archivePath ${WORKSPACE}/${APPNAME}.xcarchive -   
      exportOptionsPlist ${EXPORTOPTIONSPLISTPATH} || bail

For this add a export_options.plist (name could be of your own choice) to your project directly.

Run the build command with this, Should be generating an ipa.

Hope this post is useful. Feel free to comment incase of any queries.