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

    EXPORTOPTIONSPLISTPATH="${APPNAME}/export_options.plist"

   # generate IPA

      xcodebuild -exportArchive -archivePath ${WORKSPACE}/${APPNAME}.xcarchive -   
      exportPath ${WORKSPACE}/${APPNAME} CODE_SIGN_IDENTITY="${IDENTITY}" -
      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.