Skip to content

Instantly share code, notes, and snippets.

@skiptomyliu
Created February 25, 2017 04:48
Show Gist options
  • Save skiptomyliu/d8e137b248b2d2d34ab3962b74229868 to your computer and use it in GitHub Desktop.
Save skiptomyliu/d8e137b248b2d2d34ab3962b74229868 to your computer and use it in GitHub Desktop.
codesign script
# Name of your app.
APP="mosaicshapes"
# The path of your app to sign.
APP_PATH="/Users/dean/Desktop/m/mosaicshapes.app"
# The path to the location you want to put the signed package.
RESULT_PATH="/Users/dean/Desktop/$APP.pkg"
# The name of certificates you requested.
APP_KEY="3rd Party Mac Developer Application: [Redacted]"
INSTALLER_KEY="3rd Party Mac Developer Installer: [Redacted]"
#APP_KEY=”Developer ID Application: [redacted]”
#INSTALLER_KEY=”Developer ID Installer: [redacted]”
FRAMEWORKS_PATH="$APP_PATH/Contents/Resources/resources"
codesign —deep -fs "$APP_KEY" —entitlements ./c.entitlements "$FRAMEWORKS_PATH/run.app"
codesign -fs "$APP_KEY" —entitlements ./p.entitlements "$APP_PATH"
productbuild —component "$APP_PATH" /Applications —sign "$INSTALLER_KEY" "$RESULT_PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment