Code signing fails for SDL2_TTF?

So, for context, I’m running Xcode 11.6 with SDL2.framework, SDL2_image.framework, and SDL2_ttf.framework all installed in my user/Library/Frameworks folder. The project was compiling no problem until I included and tried to initialize SDL2_ttf, now I get a “Command CodeSign failed with a nonzero exit code” error every time I try to run. The issue report looks like this:

It looks like the other two frameworks got signed just fine, so I assume this is an issue with SDL2_ttf not being set up correctly/requiring something different than the other two frameworks? Has anyone else dealt with this/ know of a potential solution?

Looking at the screenshot, it’s saying that FreeType.framework inside SDL2_ttf.framework isn’t signed, so when it goes to sign SDL2_ttf.framework it fails, since all subframeworks etc. must be signed.

Xcode doesn’t seem to want to code sign frameworks that are embedded within other frameworks. Manually code signing FreeType.framework should work (see my comment below about not building with a systemwide version that you’ve installed somewhere).

Also, you will 100% want to make sure those are getting bundled inside your app (Xcode should do this for you, but check to make sure; there should be an Embed Frameworks item in your project build settings in the Build Phases tab).

And probably have the non-system frameworks you’re building your app with (SDL2, SDL2_ttf, etc.) inside your project folder alongside the .xcodeproj instead of in ~/Library/Frameworks, so your project version control will have the specific version of those libs it was built with (and also in case you need to manually codesign a framework embedded within another framework).

Another solution would be to copy FreeType.framework out of SDL2_ttf.framework and have it be alongside it, then make sure to link against FreeType.framework just like you did with SDL2_ttf.framework