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.
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.
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...
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:
Now it should work.
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.
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.
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:
The solution is easy enough. The "Apple engineering are lazy" solution: