Xcode 8 throws the following error despite provisioning seems to be fine:
How to fix it?
It looks like an Xcode 8 bug. Cleaning the project by pressing Command+Shift+K or Product -> Clean fixes it.
I had a similar problem, unfortunately, I'd have to do a full clean frequently, a very expensive (~5-6 minutes) operation for my project and rig.
It turns out this can be caused by (during a custom build phase) adding a custom 'BuildDate' field on my plist AFTER the "Copy Bundle Resources", in order to display that value for debug purposes in the app.
Not sure if the error is intentional or an Xcode 8 bug. I also found that performing any editing, even adding and deleting a character to the code base allowed me to run without doing a full clean first.
Adding that entry to a separate plist BEFORE the "Copy Bundle Resources" build phase and then drawing from that plist for BuildDate (rather than info.plist) solved the problem for me. More details in the provided source.
Source: https://forums.developer.apple.com/thread/63955 (I do not claim full credit for this fix, but the detailed fix solved the problem for me)
Another solution is to update the version number. It works and you don't need to clean which saves time.
In my case, Xcode shows this error quite randomly. The simplest solution which works for me is to just modify one line of your source code and build the project again. Adding an empty line is enough.
In My Case, It is Provisioning Profile Issue.
Here is the Fix:
1) Select XcodeProject -> Target -> Signing -> Team as None.
2) XCode -> Preferences -> Accounts -> Apple IDs -> (Remove the apple Id once, please make sure you should have apple id credentials in order to add it again)
3) Add the apple ID again.
4) Quit Xcode.
5) Open Xcode
6) Select XcodeProject -> Target -> Signing - > Select the new Team added.
It should be working now.
In my case, one of frameworks was set to Deployment target 12.0, which is higher than my actual device to run.. Fixing it to lower version, worked.
This error happened to me when I tried to install .app format application onto iOS physical device. Make sure you are trying to install on the correct deivce type.
In my case, the problem was in my own framework libraries having "Deployment Target" of 12.1 that was set like this by default on creation by Xcode. The main app I was adding these libraries to was having "Deployment Target" of 9.3. Problem was happening when deploying to iOS 10 physical device. Setting framework libraries to the same "Deployment Target" as the app solved the problem.
I guess an obvious rule of thumb is to set frameworks to Deployment Targets that are "older", than the target app. My fault, but I'd prefer some warnings and less cryptic error for such a case. Xcode 10.
I had the same issue with a watchOS app; the only thing I could get to resolve the issue was to clear out all Provisioning Profiles by deleting them from ~/Library/MobileDevice/Provisioning Profiles/
, and then allowing Xcode to re-download what it needed (I'm allowing Xcode to automatically manage signing).
For me the message disappeared after I upgraded iOS from 10.3.3 to 12.3.1 on the device where I was trying to run the application.