Unable To Port SDL2 Game To macOS - Issues With Framework Signing?

Hi,

We are trying to port one of our SDL2 games to macOS but there is an issue with the framework signing?

Please see below error message we get on macOS Xcode v13:
(we use SDL2_image, SDL2_mixer, & SDL2_ttf)

CodeSign /Users/jesse/Library/Developer/Xcode/DerivedData/TC4T-macOS-gfrjtvvdkdcrvrdrgfncgouwxhjv/Build/Products/Debug/SDL2_mixer.framework/Versions/A (in target 'TC4T-macOS' from project 'TC4T-macOS')
    cd /Users/jesse/Desktop/TC4T-macOS/TC4T-macOS
    export CODESIGN_ALLOCATE\=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
    
    Signing Identity:     "Apple Development: slnthero@aol.com (BGKL2GRK2A)"
    
    /usr/bin/codesign --force --sign 093CE8B73901EE50F6AD77E432AC53028F982EE0 -o runtime --timestamp\=none --preserve-metadata\=identifier,entitlements,flags --generate-entitlement-der /Users/jesse/Library/Developer/Xcode/DerivedData/TC4T-macOS-gfrjtvvdkdcrvrdrgfncgouwxhjv/Build/Products/Debug/SDL2_mixer.framework/Versions/A

/Users/jesse/Library/Developer/Xcode/DerivedData/TC4T-macOS-gfrjtvvdkdcrvrdrgfncgouwxhjv/Build/Products/Debug/SDL2_mixer.framework/Versions/A: code object is not signed at all
In subcomponent: /Users/jesse/Library/Developer/Xcode/DerivedData/TC4T-macOS-gfrjtvvdkdcrvrdrgfncgouwxhjv/Build/Products/Debug/SDL2_mixer.framework/Versions/A/Frameworks/Opus.framework
Command CodeSign failed with a nonzero exit code

Completely new to macOS and Xcode, don’t know how to proceed.

Another issue is that on Xcode v13 we get almost 2000 warnings like below:

/Library/Frameworks/SDL2.framework/Headers/SDL_misc.h:33:10: Double-quoted include "begin_code.h" in framework header, expected angle-bracketed instead

Any ideas?
Thanks!

Jesse “JeZxLee”

This is an SDL issue (you can open an issue on GitHub). There is an SDL header (SDL_misc.h) that is using double quotes for an include, but Frameworks ought to use angle brackets to ensure they include the expected file instead of one from a different search path.

You can disable the warning in the “build settings” section of the project/target view. just search for “quote”

This appears to be indicating you are attempting to code sign SDL_mixer, but SDL_mixer was built with at least one embedded framework (Opus.framework) that has no signature of its own. You can sign it yourself when you build SDL_mixer and sign SDL_mixer at that point instead.

How do I build SDL2_mixer myself?