Bundle format unrecognized, invalid, or unsuitable. Command CodeSign failed with a nonzero exit code

When I try to run my app after downloading the new framework, I always get this error message, for the build time

bundle format unrecognized, invalid, or unsuitable. Command CodeSign failed with a nonzero exit code

It has something to do with code sign, keychain, and the code sign certificate (sometimes with or without the signing identity after troubleshooting, removing, and adding). I have spent 5 hours searching stack flow, GitHub, youtube, and the like, yet I still haven’t found an answer (I won’t go into details, but I have actually tried to solve the problem). If you know any leads that could help me, that would be great. (BTW I am doing this during Covid with Xcode 11, and a MacBook air with the latest software.)

This involves the AVFoundation framework during the Match Game. My computer always displays an error whenever Swift tries to embed and sign it into my app.

Hi Halsey,

Welcome to the community! I’m glad you tried solving the problem on your own :slight_smile:

What do you mean run after “downloading the new framework?”

Once I ran the app after installing the AVFoundation.framwork, and after I set up all of the sound class things and the sound class reference in view controller, then this error came up. (Note: The code I used is fine, I double checked, its just that Chris was using an earlier version of Xcode.)

Also, today I deleted my public and private keys for my certificates (what if Xcode mixed them up?), and then the certificates themselves. Now I have a request pending for apple to get me a new certificate, and I am trying to sign manually by getting a provisional profile.

I got it! It took me awhile but I found it on the last 3 inputs from this https://stackoverflow.com/questions/37720234/xcode-bundle-format-unrecognized-invalid-or-unsuitable. It mentioned having the options “Do not Embed” in the general tab from “Linked Frameworks and Libraries”, and then setting the build phase’s “Link Binary with Libraries” to required.

I hope this comes in handy! Also if this does not work, keep looking, as this is a suprisingly common error.