50

I know this has been asked and answered multiple times but I'm tearing my hair out as none of the proposed solutions appears to work.

enter image description here

I receive the above error, despite having a valid provisioning profile which, as far as I can tell matches the bundle identifier:

enter image description here

I've followed the steps in various suggested solutions on this site, including deleting all existing certificates and starting again, as suggested here and here.

One thing I have noticed is that the profile doesn't show up in the code signing lists, either for target or project.

Can anyone offer any further suggestions?

16 Answers 16

55

This happened to me yesterday. What happened was that when I added the device Xcode included it in the wrong profile by default. This is easier to fix now that Apple has updated the provisioning portal:

  1. Log in to developer.apple.com/ios and click Certificates, Identifiers & Profiles
  2. Click devices and make sure that the device in question is listed
  3. Click provisioning profiles > All and select the one you want to use
  4. Click the edit button
  5. You will see another devices list which also has a label which will probably say "3 of 4 devices selected" or something of that nature.
  6. Check the select all box or scroll through the list and check the device. If your device was unchecked, this is your problem.
  7. Click "Generate"
  8. DON'T hit Download & Install – while this will work it's likely to screw up your project file if you've already installed the provisioning profile (see this question for more info).
  9. Open Xcode, open the Organizer, switch to the Devices tab, and hit the Refresh button in the lower right corner. This will pull in the changes to the provisioning profile.

Now it should work.

7
  • 7
    @John: I don't see any refresh button in Organizer window, can you please let me know where exactly it is ? Commented Nov 3, 2014 at 6:46
  • 1
    Anybody found Devices tab?
    – D4rWiNS
    Commented Jan 19, 2016 at 9:39
  • 3
    There is no devices tab now. You can get it from Window > Devices. Commented Sep 2, 2016 at 2:29
  • This is perfect, but there is 1 interesting thing which could also happen. If device date is set to later than your provisioning profile expiry, this error will show up... :D Commented Apr 3, 2017 at 10:09
  • For Distribution Provision Profile. Its throwing same error. I beleive there is no question of devices for distribution.
    – Kartiikeya
    Commented Jan 8, 2018 at 6:00
22

If none of above stated works then check for your device date, make sure your device date doesn't exceed profile expiry date i.e. not set to far future.

2
  • 1
    You have the real intelligence which needed to IT industries.Thanks for giving answer. Carry on this. Commented Nov 18, 2014 at 7:38
  • After hours of research, I finally find a genuine answer! Thank You so much Commented Feb 8, 2021 at 8:33
19

+1 to banging my head against the wall for a day or two...

Also check this setting:

Build Settings -> Code Signing -> Provisioning Profile

After following the above steps, "Automatic" setting worked for me. ~kjm~

0
18
File > Workspace Settings > Set Build system to "Legacy Build System"
3
  • Can you please add some explanation that why it is happening? Commented Oct 12, 2018 at 6:51
  • There is no option Workspace Settings in File section. Version 10.1 (10B61) Commented Dec 7, 2018 at 14:49
  • This solution works for me. Actually what I've got is that there's some compatibility issue between my device and Xcode version. Commented Jan 22, 2019 at 8:31
16

Xcode5 has broken this again (congratulations to Apple for failing to bother testing one of their buggiest bits of code. Again).

A new way to break/fix it:

If you have:

  1. An old profile on your device (team profile, or non-team profile)
  2. A new profile generated automatically on the App Store, by any copy of Xcode5, even if it's simply an update to the profile you already had
  3. (NB: if any colleague adds themself to the profile, this triggers the above "change")
  4. You use the new "Accounts" dialog to download profiles (NB: this is now REQUIRED by Apple for various situations - all other approaches, including manual download, appear to be unsupported. Even though the Apple Developer site TELLS YOU TO MANUALLY DOWNLOAD! Don't do it! It breaks Xcode5!)
  5. Xcode5 will INCORRECTLY hide AND RENAME that profile in the drop-down selector in Build Settings
  6. (I detest this drop-down. Some idiot at Apple keeps removing information from it, and someone else keeps adding it back, it flip-flops between Xcode point releases. WHY??!?!)
  7. There is NO WAY you can select the correct profile - whatever you select, Xcode5 will use the wrong one

The solution is easy enough. The "Apple engineering are lazy" solution:

  1. Go to Xcode5 -> Window -> Organizer -> Devices
  2. Select your device
  3. Select provisioning profiles
  4. Delete everything relating to your current project and/or Team (even other projects, if necessary - they can all be downloaded later if still needed!)
  5. Re-build.
  6. You should get an error from Xcode5 that the profile doesn't exist. Even though you manually had seleted the profile that was ALREADY PRESENT on your machine (yep - that dropdown is buggy again. It lies about the profile it selects behind the scenes!)
  7. In the profile selector, select the "real" profile
  8. Build, run - success!
14

It happened to me when I accidentally left the build in release mode.

1
  • Did you run it in release mode Commented Jan 21, 2019 at 16:24
5

This can happen if your provisioning profile has expired. Another reason could be that you device date exceeds the expiry date of your provisioning profile. Please make sure that your device date is correct.

0
3

After spending the day I realized it was a simple change in Project Settings

File -> Project Settings... -> Build System -> Legacy Build System.

In a project setting, you will see Build System named drop down and in that drop down select Legacy Build System

0
2
  1. Delete all certificates from the keychain of the account which you are trying to use provisioning profile
  2. Delete Derived data
  3. Clean the folder(cmd+sht+alt+k)
  4. Clean the project(cmd+sht+k)
  5. Build & Run
1

In my case it was just after a new Program Licence Agreement was released so we had to accept them and it was fine.

1

I had this error because I was testing my app to perform a certain action in the future. In other words, I had a different time on my test device, therefore, the certificate would not allow me to build.

Apparently, my certificate expires in a few days...

1

In my case, it was the problem when I setup my time manually two month earlier on my iPhone. But when I changed to set time automatically, it worked fine.

Setting -> General -> Date & Time -> set time automatically

If it does not work then set time automatically of both mac & iPhone, it may work fine.

1

I have spent about a week solving this problem. Most of the answers are sort of magic (no logical purposes for these algorithms) and they were not useful for me. I found this error in Xcode console:

ERROR ITMS-90174: "Missing Provisioning Profile - iOS Apps must contain a provisioning profile in a file named embedded.mobileprovision."

And found this answer solving this issue. The case is to switch Xcode Build system to the Legacy one.

I was deploying my Ionic app.

1

After wasting my half day I got this working.

Select Target > Edit Scheme > Select Run > Change Build Configuration to debug
3
  • How will you build for Release if this is a required step? Makes this unusable. Commented Apr 13, 2020 at 16:44
  • by default mode is debug, but if you need build in release mode then you can and you can able to install on the device via any installation link of build, And while you uploading to AppStore then it will be managed automatically according to that. Commented Apr 14, 2020 at 14:26
  • This was the key. Thank you! I was searching for several hours...
    – Torsten B
    Commented May 7, 2021 at 8:02
0

I'm still not sure what the issue was but deleting all certificates and starting over (albeit twice) eventually solved it.

My best guess is that I've missed some small but important detail of the procedure. Unfortunately I can't be any more specific than that.

0

Make sure you have added your device - https://developer.apple.com/account/ios/device/create

Go into iTunes and click on the serial number and it'll change to the UDID - then right click to Copy the UDID and register it as your device.

You can then add that device to your provisioning profile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.