error: exportArchive: The operation couldn’t be completed. (IDEDistributionErrorDomain error 3.) I am using Jenkins automation build for iOS.

Previously I have been using xcode 8.1 with no error showing. But i have updated the xcode to 8.3 and I'm facing errors now. I have the scripts as below:

OLD SCRIPT

xcodebuild -exportArchive -archivePath Sample.xcarchive -exportPath Sample -exportFormat ipa -exportProvisioningProfile 'Sampledemo'

xcodebuild: error: invalid option '-exportFormat'


NEW SCRIPT

xcodebuild -exportArchive -exportOptionsPlist exportOptions.plist -archivePath Sample.xcarchive -exportPath Sample  PROVISIONING_PROFILE_SPECIFIER="Sampledemo"

error: exportArchive: The operation couldn’t be completed. (IDEDistributionErrorDomain error 3.)

Error Domain=IDEDistributionErrorDomain Code=3 "(null)" UserInfo={IDEDistributionErrorSigningIdentityToItemToUnderlyingErrorKey={


but I'm facing this issue now. How can I solve the issue ?
https://forums.developer.apple.com/thread/75038


  Hi!
  
  I think I've got it figured out...
  
  instead of:

-exportProvisioningProfile "MyProvisioningProfile"

  
  use:

PROVISIONING_PROFILE_SPECIFIER="MyProvisioningProfile"

  
  We've got unity building the project every time and it doesn't fill in
  the PROVISIONING_PROFILE or PROVISIONING_PROFILE_SPECIFIER. And it
  looks like it will figure out the alphabet soup that belongs to
  PROVISIONING_PROFILE by looking it up itself provided you have
  downloaded it already.