Please, help: Can't create xcarchive to ipa with xcode 9? : I am trying to convert my xcarchive to ipa. I tried using these advise with no success: https://stackoverflow.com/questions/14934808/how-to-convert-xcarchive-to-ipa-for-client-to-submit-app-to-app-store-using-ap

I am an absolute beginner to Mac and Apple Profiles and certificates. 

All I know is:
I have iOS distribution certificate
I have Production Provision profile

I just hired a Mac in Cloud to convert it to ipa and upload to the appstore. 

I am using this type of command: 

        xcodebuild 
      -exportArchive 
      -exportOptionsPlist {PATH_TO_PROJECT_ROOT}/ios/build/info.plist 
      -archivePath {PATH_TO_ARCHIVE_MADE_USING_XCODE}/MyApp.xcarchive 
      -exportPath {PATH_TO_EXPORT_THE_APP}/MyApp.ipa

with this info.plist code:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
        <dict>
          <key>provisioningProfiles</key>
          <dict>
            <key>UUID</key>
            <string>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</string>
          </dict>
          <key>signingCertificate</key>
          <string>iPhone Distribution</string>
          <key>signingStyle</key>
          <string>manual</string>
          <key>teamID</key>
          <string>XXXXXXXX</string>
      </dict>
    </plist>

And I am getting an error: no matching certificate "iPhone Distribution: ..." for teamID: ....

What am I doing wrong?

What is the exact value I must input in "<key>signingCertificate</key>
      <string>iPhone Distribution</string>" ?

Also, am I supposed to install any certificates or something like that on the Mac? I have never ever used Mac or Xcode before, I am just following the tips for generating ipa with command line code.