Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 8 "The application does not have a valid signature"

Tags:

xcode

xcode8

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?

like image 882
Alexander Vasenin Avatar asked Aug 28 '16 02:08

Alexander Vasenin


2 Answers

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

like image 85
Alexander Vasenin Avatar answered Sep 30 '22 18:09

Alexander Vasenin


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)

like image 33
CJ Dev Avatar answered Sep 30 '22 18:09

CJ Dev