Skip to content

Commit

Permalink
Added notary instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
hohonuuli committed Jan 24, 2023
1 parent afe4944 commit 4e2456e
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion README.md
Expand Up @@ -18,8 +18,35 @@ VARS Uses libraries in [mbari-org/maven](https://github.com/mbari-org/maven). Yo

### Code signing for Macs

Set an the environment variable, `MAC_CODE_SIGNER` to the name of your signing identity (e.g. `Developer ID Application: foo bar (ABC123456)`). Then run `gradlew clean jpackage --info`. This will build a signed app at `org.mbari.vars.ui/build/jpackage/VARS Annotation.app`. This will then need to be notarized by Apple using:
```bash
# You need a Developer ID Application cert from developer.apple.com. A fake id used below
export MAC_CODE_SIGNER="Developer ID Application: blah blah blah (ABC123456)"

cd vars-annotation

# The build will correctly sign everything if your MAC_CODE_SIGNER is correct
./gradlew clean jpackage --info

cd org.mbari.vars.ui/build/jpackage

# App must be packaged/zipped to be notarized
ditto -c -k --keepParent "VARS Annotation.app" "VARS Annotation.zip"

xcrun notarytool submit "VARS Annotation.zip" \
--wait \
--team-id ABC123456 \ # Found in your Developer ID cert name
--apple-id <your apple login> \ # Your email you log in to developer.apple.com with
--password "<your app specific password>" # You have to use an app password for your account from appleid.apple.com

# We staple to the original app, NOT the zip
xcrun stapler staple "VARS Annotation.app"

# Remove the old zip file
rm "VARS Annotation.zip"

# Rezip the app and use that zip to distribute it.
ditto -c -k --keepParent "VARS Annotation.app" "VARS Annotation.zip"
```



0 comments on commit 4e2456e

Please sign in to comment.