Code Signature Invalid

2020-08-09 07:15发布

Recently, I wasn't able to run some of my apps in Xcode. They would build, then quit without showing up. So I tried going into the Debug folder and starting the app manually. I ended up getting an error report from macOS telling me that the exception type was "Code signature invalid". I also ran a test in Xcode and it told me that the code wasn't signed at all, and that it failed with exit code 1. I know that something must be wrong with my code signing in my Xcode projects, but I'm not sure how to fix this. It's affecting both applications that I have on the Mac App Store, so I'm guessing it has to do with certificates. Please let me know how I could fix this. I'm making a macOS app with Xcode 8. I desperately need this error fixed so if you have any ideas please post them and if they work I will promptly award you the +50 rep. Thanks!

Here is a screenshot of the error I'm getting on one of the projects.

Error Screenshot here

4条回答
欢心
2楼-- · 2020-08-09 07:37

Experienced the same issue, what helped for me was this:

Open finder and show the project package contents, and open the following file with Xcode:

project.pbxproj

Search for: PROVISIONING_PROFILE_SPECIFIER

And comment it out for both the debug & release section:

/*PROVISIONING_PROFILE_SPECIFIER = "";*/
查看更多
beautiful°
3楼-- · 2020-08-09 07:45

Strangely enough, the update to Xcode 8.1 fixed it! So the moral of the story is: try updating if an update is available and see if that fixes any code signing problems!

Thanks everyone for your helpful answers. I'm sure they'll solve someone's problem.

查看更多
聊天终结者
4楼-- · 2020-08-09 07:49

You should try cleaning your project (CMD + SHIFT + K), it worked for me.

查看更多
对你真心纯属浪费
5楼-- · 2020-08-09 07:50

There have been problems in the past with having spaces in names and paths. I would suggest removing the space form the app name and see if that effects anything.

Also is your test target signed?

查看更多
登录 后发表回答