Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App Installation failed. No code signature found

Tags:

I recently upgraded to Xcode 10 and began the process of updating our app to switch 4.2 After a day or so of rebuilding 3rd party frameworks and adding in workarounds to various issues, I was able to run our app on the new simulators.

However, when I tried running on my personal phone (running iOS 12.0 GM) I ran into an error when installing the app as described in the title.

I know that there are a lot of already answered questions regarding this topic on SO & the Internet, however I was unable to get any of these to work.

It's been blocking me for around a day & a half now so I was wondering if anyone had any insight into how this could be mitigated.

Here are the steps I've take so far that have not worked (perhaps they will work for others in the future!):

  1. Clearing derived data
  2. Deleting and re-downloading all provisioning profiles on my computer
  3. Cleaning the build directory (cmd + k & cmd + shft + k)
  4. Deleting the original app from my phone
  5. Restarting Xcode (Version 10.0 (10A254a) [the GM])
  6. Restarting my Mac (Macbook Pro 2018 running macOS High Sierra)
  7. Restarting my device (iPhone X running iOS 12.0 GM)
  8. Many various combinations of the above, including all at once
  9. Re-generating provisioning profiles for the app on developer.apple.com (we use manual signing)
  10. Deleting and recreating provisioning profiles for the app on developer.apple.com
  11. Sacrificed a goat to Tim Cook
  12. Ensuring the signing certificate matches the provisioning profile
  13. Deleting the old version of Xcode from my computer & insuring command line tools are on the xcode 10.0 gm version
  14. Deleting & reinstalling Xcode 10.0 GM
  15. Ensuring all copied frameworks have code sign on copy checked
  16. Rebuilding all frameworks via Carthage using the swift 4.2 compiler (remember, it all works on the simulator).
  17. Ensured code signing required is set to YES in the SDKSettings.plist
  18. deleted all old signing certificates on my computer
  19. Deleted & recreated certificates on developer.apple.com
  20. Removed & re-added my device to developer.apple.com
  21. Changed code signing from manual to automatic
  22. Ensured that signing certificates are Developer and not Distribution

Any help would be greatly appreciated :)

Update: I tried redownloading and rebuilding from the ground up on a fresh machine, and the same issue occurs. Interestingly I can archive and validate the app just fine.

Also tried signing an empty project with the same bundle ID and it worked fine. So the issue is either in our 3rd party frameworks or some weird setting that got enabled while transitioning from Xcode 9.4. Going to start removing 3rd party frameworks one by one until I can get this to compile.

Update 2: Still no luck. Tried clearing out most frameworks and nothing. Here are the device logs, wondering if Skipping a profile because of error 0xe8008012 has something to do with it:

https://gist.github.com/joshuawright11/6889ce1a0872262df77f97d63830baa5

Update 3: So I was able to get it to install, by commenting out the carthage copy-frameworks script in the build phases (and cleaning/nuking derived data after doing so). Of course this means that it crashes on boot since it's missing those frameworks, but it does mean the issue is either with carthage or one of the linked carthage frameworks. Not our signing certs, provisioning profiles, or codebase. Going to try removing those frameworks one by one and I'll update here.

Final Update Figured it out finally. The solution turned out to be pretty niche (see below) but hopefully this question serves as a compilation of every solution related to this issue across the internet haha.

like image 325
Josh Avatar asked Sep 17 '18 18:09

Josh


People also ask

What happens when Windows fails to validate the digital signature?

When you deploy a packaged Windows app, Windows always attempts to validate the digital signature on the app package. Failures during signature validation block deployment of the package.

How to deploy an app package with a digital signature?

To be able to deploy an app package, it must not only be trusted in the user’s context but also the local computer context. As a result, the digital signature can appear valid when viewed in the Digital Signatures tab from the previous step but still fail validation during deployment of the app package.

How do I get the error code for a failed deployment?

Depending on how you attempted to deploy your app, you might not have received a meaningful error code for the deployment failure. In this case, you can usually get the error code directly from the event logs. Run eventvwr.msc. Go to Event Viewer (Local) > Applications and Services Logs > Microsoft > Windows.

Is the app package signed or unsigned?

The app package is unsigned. Only signed Windows app packages can be deployed. For info about signing an app package, see How to sign an app package using SignTool. The certificate chain that was used to sign the app package ends in a root certificate that isn't trusted.


Video Answer


1 Answers

Figured it out:

I ran into this issue with carthage: https://github.com/Carthage/Carthage/issues/2472 and used their suggested solution of setting EXPANDED_CODE_SIGN_IDENTITY='' when I was transferring stuff over to xcode 10.

Evidently this line is what causing carthage to hurt itself when copying frameworks, causing the error. I downloaded the most recent version of carthage to fix the issue, and then removed the EXPANDED_CODE_SIGN_IDENTITY='' line and everything worked. What a waste of time.

like image 76
Josh Avatar answered Sep 29 '22 23:09

Josh