1

I have an app that I have been building and distributing fine for the last six months or so. I have been doing this on my personal Macbook as, due to Corona/furlough etc. I didn't have access to my work machine.

I now have my work machine back, and I have it tight to my companies App developer account, have imported as many certificates as I could find and can build the app. However, I am struggling to successfully distribute it. When I come to distribute I get an error along the lines of "there is a distribution certificate but the private key could not be found."

I have tried a loooooad of solutions to try and resolve this - export/import my developer profile, AirDrop files from one keychain to another, generate a new distribution certificate and nothing has worked, and I am really out of ideas.

If it helps things, the Macbook I'm trying to export from is running xcode 12.5, whereas the target machine is only on 11.2.1 (can't update any further as it's running on a 2013 iMac). Also, the whole certificate thing isn't quite my area as I'm not an app developer by trade, this is for an app built in Nativescript

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
  • When you said you exported your developer profile & exported it, does that mean you exported both the certificate & private key from Keychain? The certificate is the item listed, then if you click on the arrow to the left and expand, it should show the private key, which you also export. I think you need to send both of those files, then attempt to download the certificate from Apple's developer portal. – AdamPro13 Jun 21 '21 at 17:05
  • Yep, I have the certificate and private key exported and I can view them in my keychain. I also exported from within Xcode which says it exported everything too. This is what confuses me, I can see everything is there – Mike Smedley Jun 21 '21 at 18:23
  • Have you gone to the Apple developer portal > Certificates, Identifiers, & Profiles, then navigated to your distribution profile and downloaded it onto your work machine? – AdamPro13 Jun 21 '21 at 19:06

1 Answers1

0

Are you "exporting" all the certificates from one developer account to another? When this happens what I do is start from 0, install the application on the new machine and create all the certificates, not export them: Register the app with a new identifier

  1. Register the app with a new identifier.
  2. Create new distribution certificate.
  3. Create a new provisional profile.
  4. Configure xcode with the new certificates.
  5. Run the app.
airumi
  • 1
  • Hmm, it seems a bit long-winded to create a new app identifier just to do this, especially when I’m reliant on tools like firebase – Mike Smedley Jun 21 '21 at 18:24