4

Using Xcode 9.1, after building an iOS app, I try to archive it. But I get the following error message:

Provisioning profile "MyAppProfile" doesn't include signing certificate "iPhone Developer: My Name (X1YZ2AB3CD)".

What is the simplest way to solve this?

Kerberos
  • 4,036
  • 3
  • 36
  • 55
Michel
  • 10,303
  • 17
  • 82
  • 179
  • refer this answer: https://stackoverflow.com/questions/47699914/ios-app-archive-and-uploading – codelover Dec 09 '17 at 17:00
  • Stuck with this right now, did you ever solve it? – Hylle Feb 07 '20 at 08:10
  • This is not on the top of my mind at the moment, but what I would try is using Automatic profile management as much as possible. And if this does not work, make sure the profiles you are using are still valid and signed with the proper dev or prod certificates. – Michel Feb 15 '20 at 03:32

3 Answers3

2

Open key chain in your mac and check your development certificate...I think your certificate is expired using which you have created your Provisioning profile..thats why it is showing "MyAppProfile" doesn't include signing certificate.

1.To solve this issue go to your developer account and download the latest development certificate and add it to keychain and remove all expired certificates from keychain.

                                Or

2.This issue also comes when you have multiple developer accounts in your keychain and the expired developer certificate name is same as that of active developer certificate. After removing the expired certificates, you must restart Xcode to let it reload the remaining certificates.

Ely
  • 8,259
  • 1
  • 54
  • 67
Neeraj Sonaro
  • 346
  • 1
  • 16
  • I tried to follow your suggestions, but it did not work. I removed the expired certificates from keychain and left only the current development certificate. Actually I do not quite understand why it is asking me for a signing certificate "iPhone Developer ...", when I am using a distribution profile (not a development profile). – Michel Nov 13 '17 at 15:59
  • Okay..Do one thing..go to keychain and check you have private key available with that certificate and let me know? – Neeraj Sonaro Nov 15 '17 at 05:18
1

Try enabling automatic signing. It will take care these things mostly. The reason for this error is you may have chosen a developer certificate(which the provisioning profile doesn't intended to use with) for distributing/release build.

jegadeesh
  • 875
  • 9
  • 22
  • I have already tried automatic signing. And it did not work this is why I came back to manual signing. – Michel Nov 13 '17 at 15:12
  • Are you sure you are using the appropriate certificate for code signing? – jegadeesh Nov 13 '17 at 15:24
  • I am actually not sure of much here. I know when it works and most of the time it does. But I have noticed several times that automatic signing (supposed to make things work smoothly) never works for me at least when it comes put an app outside of my local environment. So I always come back to manual for serious matters. – Michel Nov 13 '17 at 15:32
  • But I am sure I am not using a certificate for a different app. – Michel Nov 13 '17 at 15:33
  • Omg, I can't stand Apple... same error, recreated Distribution cert & App-store profile 3 times, it is most definitely selected and in the profile.... you know there's a problem when submitting the app takes more debugging than building the app – Ryan Barrett Jan 12 '20 at 01:12
0

I have just encountered the same problem. What fixed it for me is to go to the xcodeproj file>Select the correct build target>Build settings>Code signing identity>select the correct identity for the build configuration (If you didn't change it in the edit scheme screen, it would be "Release" for archiving).

AmirZ
  • 401
  • 6
  • 12