Created
January 18, 2017 11:36
-
-
Save Mazyod/a9d3e41bf22602b9ae2297b73503da10 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
CERT_NAME='3rd Party Mac Developer Application: [YOUR NAME]' | |
APP_NAME='mygame.app' | |
ENTITLEMENTS='mygame.entitlements' | |
# remove existing meta files | |
find ${APP_NAME} -type f -regex '.*meta' -delete | |
# copy fixed plist files you have already prepared | |
# pro tip: change bundle id for unitypurchasing to something cusotm | |
cp Info.plist ${APP_NAME}/Contents/Info.plist | |
cp Info-lib1.plist ${APP_NAME}/Contents/Plugins/lib1.bundle/Contents/Info.plist | |
cp Info-unitypurchasing.plist ${APP_NAME}/Contents/Plugins/unitypurchasing.bundle/Contents/Info.plist | |
# fix permissions | |
chmod -R a+xr ${APP_NAME} | |
codesign -f --verify --verbose --deep \ | |
-s ${CERT_NAME} \ | |
--entitlements ${ENTITLEMENTS} \ | |
${APP_NAME}/Contents/Plugins/lib1.bundle | |
codesign -f --verify --verbose --deep \ | |
-s ${CERT_NAME} \ | |
--entitlements ${ENTITLEMENTS} \ | |
${APP_NAME}/Contents/Plugins/unitypurchasing.bundle | |
codesign -f --verify --verbose --deep \ | |
-s ${CERT_NAME} \ | |
--entitlements ${ENTITLEMENTS} \ | |
${APP_NAME} | |
productbuild --component ${APP_NAME} /Applications --sign ${CERT_NAME} ${APP_NAME}.pkg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment