2
votes

I'm trying to build a project using SDL 1.2 on OSX 10.9.5 with XCode 6.1.1 .

The codesigning on copy for the SDL_Mixer 1.2.12 & SDL_Image 1.2.12 frameworks failed because they contains sub-frameworks.

So I moved these sub-frameworks out the SDL frameworks, and all can be signed except for webp.framework , which doesn't contain any sub-frameworks.

The build & error messages are :

CodeSign /Users/manu/Library/Developer/Xcode/DerivedData/Tennis_Elbow_Manager-ejjxrszvggswuwbqutndhmguwbxc/Build/Products/Debug/Tennis\ Elbow\ Manager.app/Contents/Frameworks/webp.framework/Versions/A cd "/Users/manu/Documents/Workspace/Tennis Elbow Manager" export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate

Signing Identity: "Mac Developer: "

/usr/bin/codesign --force --sign --preserve-metadata=identifier,entitlements,resource-rules /Users/manu/Library/Developer/Xcode/DerivedData/Tennis_Elbow_Manager-ejjxrszvggswuwbqutndhmguwbxc/Build/Products/Debug/Tennis\ Elbow\ Manager.app/Contents/Frameworks/webp.framework/Versions/A

.

/Users/manu/Library/Developer/Xcode/DerivedData/Tennis_Elbow_Manager-ejjxrszvggswuwbqutndhmguwbxc/Build/Products/Debug/Tennis Elbow Manager.app/Contents/Frameworks/webp.framework/Versions/A: code object is not signed at all In subcomponent: /Users/manu/Library/Developer/Xcode/DerivedData/Tennis_Elbow_Manager-ejjxrszvggswuwbqutndhmguwbxc/Build/Products/Debug/Tennis Elbow Manager.app/Contents/Frameworks/webp.framework/Versions/A/webp Command /usr/bin/codesign failed with exit code 1

The SDL_image framework containing the webp.framework can be downloaded from here : https://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.12.dmg .

If I remove the webp.framework from the copy, everything is built correctly, but then my app doesn't start as it can't link to webp .

I tried to copy the webp.framework to the workspace instead of referencing it, but it didn't change anything.

Thanks in advance to anyone who could shed some light on this mysterious issue !

2

2 Answers

4
votes

I've found another solution by self-signing both the webp and SDL2_image frameworks:

  1. Navigate to <FRAMEWORK_LOCATION>/SDL2_image.framework/Versions/A/Frameworks/webp.framework.
  2. Delete the Versions folder (codesign will complain about the bundle format otherwise).
  3. Execute codesign -f -s - webp.
  4. Navigate to <FRAMEWORK_LOCATION>/SDL2_image.framework.
  5. Execute codesign -f -s - SDL2_image.
2
votes

Ok, I think I found out what's wrong : the info.plist's Executable File field contains "FLAC" instead of "webp", so webp is likely seen as an additional executable that should be signed on its own.

To validate the signature before to submit to the App Store, it's also needed to add a "Bundle identifier" field (with "webp", for example).

I didn't try to fix that, as I already moved to another solution : recompiling SDL_image without webp support.