-
Notifications
You must be signed in to change notification settings - Fork 292
CodeSigning
NickyWeber edited this page Oct 14, 2014
·
9 revisions
Sprite Builder is shipped with binaries and dylibs(cocos2d plugins and 3rd party). As of Mavericks, those have to be signed as well
The provided script scripts/CodeSign.sh
will sign and archive the built app in the build/
folder. If you want to sign the app with your identity you will have adjust some environment variables in that script.
To test sandboxing the app has to be signed. To enable sandboxing make sure a Code Signing Identity is set in the Build Settings. Have a look at the SpriteBuilder.entitlements
file and see if App Sandbox
is set to YES. Testing with the debugger enabled can be achieved by signing the app with a final Run script Build Phase. This could look like this:
#!/bin/bash
if [ -z "${CODE_SIGN_IDENTITY}" ]; then
echo "Not code signing: No code signing identity set"
exit 0
fi
CONTENTSDIR="${BUILT_PRODUCTS_DIR}"/"${CONTENTS_FOLDER_PATH}"
FRAMEWORKSLOCATION="${BUILT_PRODUCTS_DIR}"/"${FRAMEWORKS_FOLDER_PATH}"
# frameworks
codesign --verbose --force --sign "${CODE_SIGN_IDENTITY}" "$FRAMEWORKSLOCATION/HockeySDK.framework/Versions/A/Frameworks/CrashReporter.framework"
codesign --verbose --force --sign "${CODE_SIGN_IDENTITY}" "$FRAMEWORKSLOCATION/HockeySDK.framework/Versions/A"
# binaries
for f1 in "lame" "ccz" "oggenc" "pngquant" "optipng"
do
codesign --verbose --force --sign "${CODE_SIGN_IDENTITY}" "$CONTENTSDIR/Resources/$f1"
done
# plugins
PLUGINFILES="$CONTENTSDIR/PlugIns/*"
for f2 in $PLUGINFILES
do
codesign --verbose --force --sign "${CODE_SIGN_IDENTITY}" "$f2"
done
Links: