Created
March 8, 2021 11:49
-
-
Save naus3a/a07069de2ff2ac98a9502be8cb0baa67 to your computer and use it in GitHub Desktop.
OSX notarize Unity+Oculus app
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/bash | |
## we assume both the app and the entitlements file are in ./ | |
APP="something.app" | |
ENT="something.entitlements" | |
ZIP="somthing.zip" | |
BUNDLE="com.something" | |
APPLE_ID="someone@somewhere.com" | |
PW="aaaa-bbbb-cccc-dddd" | |
DEV_ID="Developer ID Application: Somebody (XXXXXXXXX)" | |
PROVIDER_SHORT="XXXXXXXX" | |
chmod -R a+xr "$APP" | |
find ./$APP -type f -exec codesign --timestamp --keychain ~/Library/Keychains/login.keychain-db -s "$DEV_ID" -f --verbose=9 --deep --options=runtime --entitlements "$ENT" {} + | |
codesign --deep --force --verify --verbose --timestamp --options runtime --entitlements "$ENT" --sign "$DEV_ID" "$APP/Contents/Plugins/ovrplatform.bundle/Contents/MacOS/ovrplatform" | |
codesign --deep --force --verify --verbose --timestamp --options runtime --entitlements "$ENT" --sign "$DEV_ID" "$APP" | |
ditto -c -k --sequesterRsrc --keepParent "$APP" "$ZIP" | |
xcrun altool --notarize-app --username "$APPLE_ID" --password $PW --asc-provider "$PROVIDER_SHORT" --primary-bundle-id $BUNDLE --file "$ZIP" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment