Search code examples
iosxcodearchiveprovisioning-profileiphone-developer-program

How to sign archive app in Xcode


I'm developing in Xcode for iOS, but have recently my macbook formatted. After installing all again I continued to update my app.

Now I'm trying to upload the binary to app store, but I get this message: enter image description here

I'm missing something but right now I don't know what.

Anyone can help me find what I'm missing?

EDIT: enter image description here


Solution

  • Go to preferences in Xcode, select accounts. If you don't see the Apple ID for your developer account you need yo log in. If you are logged in, select the account, press details and the refresh button in the left hand corner of the details popup.

    If you blew away the keychain for your user on the MacBook when reformatting the private key needed to sign is missing.

    Without the private key you need to generate a new signing certificate. If you switch code signing on in build settings for your target, just type "code signing" in the search for the build settings tab, and you will find it. Xcode will now ask you if you want it to generate a new certificate.

    As a side note, I would recommend that you export the signing certificate and the private key from the keychain and store them somewhere save. I tend to put my signing certificate and provisioning profiles in a git hub repository together with the source code.