1

I am trying to submit my app to iTunes Connect. I have submitted it before(TestFlight) but at some point my certificates have stopped working. I have tried to renew them with 2 different approaches without any success.

Approach 1: In XCode I get the error that says that the developer profile already has a distribution certificate and suggest me resetting it. Resetting results in the same pop up window so this goes into a loop and does not work.

enter image description here

Approach 2: If I create the certificates and profiles manually in developer portal the archiving process only works if I select the correct identities in the build settings, otherwise the build fails and XCode says that it can not find code signing identities. But I cannot submit the archive because the following error occurs:

enter image description here

I have also tried exporting the .ipa from the archive(to upload it with Application loader) but this does not find the signing identities as well with the same error:

enter image description here

So now I am trying to go the suggested route where XCode is supposed to do all the work for me.(https://developer.apple.com/library/ios/qa/qa1814/_index.html) For a clean slate I have deleted all certificates, key-pairs and provisioning profiles from my mac and developer center.

I have removed all relevant keypairs and certificates from keychain. I have deleted all the provisioning profiles from my mac. I have also deleted all certificates and profiles from the developer site. I have also deleted and re-added the developer account in XCode settings.

I set the project's build settings: enter image description here I also set the team in general tab.

Now I guess XCode is supposed to fix my signing issues but after I press fix issues below the team option in general tab

enter image description here

I still go to the reset development/distribution certificate loop.

enter image description here

One thing I notice is that XCode does generate a key-pair to the keychain but not the certificate.

How can I upload my app to iTunes Connect with or without these problems?

Im using XCode 7.2 and this is a Unity3D app.

tonisives
  • 1,962
  • 1
  • 18
  • 17

2 Answers2

0

I have removed all relevant keypairs and certificates from keychain

Okay, but that is what Xcode is complaining about (each time it says "but it is not installed locally" in all the messages you have displayed). You need the private/public certificate pairs in your keychain. If you deleted the private half of the certificates, that is a huge mistake, because you can never restore it (Apple does not have it — it is private). You now will probably have to start all over again by throwing away absolutely everything — all certificates, all provisioning — both locally and at the member center, and beginning from scratch.

This can be done, but it is not trivial, because if you launch Xcode while any remnant remains, Xcode will try to install the certificate back into your keychain. To do it, you would need to delete everything from the keychain, mobile provisions folder, and member center, with Xcode not running.

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • See the discussion here http://stackoverflow.com/questions/13502639/distribution-provisioning-profiles-are-valid-but-development-profiles-say-valid and especially here http://stackoverflow.com/questions/2177143/how-to-renew-an-iphone-development-certificate/13426659#13426659 – matt Jan 08 '16 at 17:34
  • Thanks for the reply. I have tried to create a new distribution certificate without XCode working but after creating one in developer center the certificate cannot be imported to Keychain Access. It fails with Error: -25295(errSecInvalidKeychain). If I drag it to "System" keychain and then move the generated keys from "login" to "System" as well the certificate is then matched with the private key. After this the XCode still says "No code signing identities found" - everything is the same as with Approach 2 in my original question. – tonisives Jan 10 '16 at 11:59
0

I managed to upload the package by extracting the .ipa from the archive with

xcodebuild -exportArchive -exportFormat ipa -archivePath {path-to-xcarchive} -exportProvisioningProfile {“profile name”}  -exportPath ~/Desktop/MyApp.ipa

and then uploading it with Application Loader.

tonisives
  • 1,962
  • 1
  • 18
  • 17