-2

I am trying to convert my xcarchive to ipa. I tried using this advice with no success: How to convert .xcarchive to .ipa for client to submit app to app store using Application Loader

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

All I know is:

  • I have the iOS distribution certificate
  • I have Production Provision profile

I just hired a Mac in Cloud to convert it to IPA and upload to the app store.

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 this?

<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 used Mac or Xcode before; I am just following the tips for generating ipa with command line code.

halfer
  • 19,824
  • 17
  • 99
  • 186
Nikolay Shindarov
  • 1,616
  • 2
  • 18
  • 25

1 Answers1

2

The certificate has to be installed in the keychain to identify this Mac as the one that can build for distribution. I don't know whether you'll be able to do that with a virtual cloud based “machine”, but in any case your phrase "I have iOS distribution certificate" is evidently mistaken, because the sense in which you need to "have" the certificate in order to distribute is "have it installed in the keychain". If you look in the Manage Certificates dialog of the Xcode Accounts preference pane, it will tell you clearly the status of your certificates.

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • Thank you. I added my profile and certificate to xCode. Now when I try to upload the app, first I chose "Automatic signing". Then I got two errors: unknow error, length: [some number] and "apps must contain a provisioning profile in a file named embedded.mobileprovision". So I chosed next time "Manual signing". Now when I try to choose a provisioning profile, I am getting: "Profile does not include the selected signing certificate". Am I supposed to install also the provisioning profiles or private keys in some way or...? I have pre-generated all of them on Linux. – Nikolay Shindarov Jul 30 '18 at 14:08
  • Sorry, that seems to me to be a new question. The use of certificates and profiles is very well documented; are you going to ask about every stage of it here in the comments? I believe I answered the part you actually asked. If you have a new question, ask a new question. Thanks. – matt Jul 30 '18 at 14:10
  • I am sorry. I will ask a new question. Thank you. – Nikolay Shindarov Jul 30 '18 at 14:22
  • @NikolayShindarov: it is too late for me to stop you asking that new question, but in future, if you can make a solid effort to research the new issue, that is an excellent thing to practice. Two questions in two hours suggests that the second problem did not get enough research, and it is only by going through that pain yourself that you will become a better engineer. – halfer Jul 30 '18 at 17:45
  • @halfer I don't think the OP has any ambition to "become a better engineer". He says "I have never used Mac or Xcode before". So clearly he has simply been handed this one-time task of getting this thing onto the app store. – matt Jul 30 '18 at 17:59
  • Fair enough @matt. Based on the intended SO audience of "professional and enthusiast programmers", I like to encourage people to get better at what they do, and if someone is just not a programmer at all (and does not want to be) then this might not be the site for them. I am not speaking of the OP here, but in the general case, I wish to discourage the idea that people can ask for free work. – halfer Jul 30 '18 at 18:05
  • I appologize once again. Will follow the forum rules in future. Thank you for your support. – Nikolay Shindarov Jul 30 '18 at 21:15