44

Xcode 8 throws the following error despite provisioning seems to be fine:

App installation failed. The application does not have a valid signature

How to fix it?

10 Answers 10

80

It looks like an Xcode 8 bug. Cleaning the project by pressing Command+Shift+K or Product -> Clean fixes it.

3
  • In addition to the answer, I had to exit XCode 8 and that did the trick, thanks! Feb 6, 2017 at 19:11
  • Restarting XCode instead of cleaning the project worked for me.
    – Thomas
    Apr 6, 2017 at 19:07
  • @Thomas didn't worked for me, still have to clean/build Apr 11, 2017 at 6:45
15

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)

1
  • 2
    I have "Append Date and Git Tag to Build Version" Build Phase, but i cannot remove it. So i just add space somewhere and then remove it. Dec 6, 2016 at 10:10
4

Another solution is to update the version number. It works and you don't need to clean which saves time.

4
  • Not sure why the downvote. I've done the clean and it takes - as mentioned above - 5 to 6 minutes between the clean and the new build. Changing the version number takes almost no time and works just the same. Mar 10, 2017 at 23:33
  • 1
    this looks a better solution to me. Apr 26, 2017 at 12:39
  • 1
    this worked for me while the accepted solution did not.
    – biomiker
    May 23, 2017 at 19:56
  • The combination of @BrentBrookler's solution and the accepted answer works for me. Well done.
    – Lawliet
    May 29, 2017 at 1:13
3

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.

2

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.

2

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.

1

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.

1

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.

0

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).

0

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.

Your Answer

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

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