Publish the Mac app
Kid Macs install the Guardian app from your server, and update from it. You build the app on your Mac and publish it to the server. The app is signed with your Apple ID, so macOS trusts it.
One time
- Install Xcode from the App Store. Open it once and accept the license.
- Install the tools with Homebrew:
brew install xcodegen node pnpm - Get the code:
git clone https://github.com/tubededentifrice/guardian.git cd guardian make -C extension setup - Make the update key. Sparkle, the update system of the app, uses it to sign each version. The private key goes into your login Keychain.
make -C macos sparkle-keys - Back up the update key to a safe place, out of the repository:
macos/build/SourcePackages/artifacts/sparkle/Sparkle/bin/generate_keys -x ~/guardian-sparkle-key.txtIf you lose this key, kid Macs cannot update. You must then install the app again by hand on each kid Mac.
Signing
Select one of the two options.
With an Apple Developer Program membership (recommended)
The app is then notarized. macOS opens it with no warning.
- Make the Developer ID certificate. Only the Account Holder of the team can do this. In Xcode, open Settings > Accounts. Select your team, then Manage Certificates > + > Developer ID Application.
- Check:
security find-identity -v -p codesigning | grep "Developer ID Application" - Create an app-specific password at account.apple.com > Sign-In and Security > App-Specific Passwords.
- Store the notary profile. The command asks for the password:
xcrun notarytool store-credentials parental-control-notary --apple-id <your Apple ID> --team-id <your team ID>
With a free Apple ID
- In Xcode, open Settings > Accounts and add your Apple ID.
- Select your Apple ID, then Manage Certificates > + > Apple Development.
- Add
ALLOW_DEV_SIGNING=1to each release command below.
The app is then not notarized. On each kid Mac, the first install needs one more command. See Set up a kid Mac.
Publish a version
RELEASE_DEST is the data/updates/macos folder on the server, as an SSH address:
RELEASE_DEST=user@server:guardian/data/updates/macos make -C macos release
The command builds the app, signs it, notarizes it and copies it to the server. Notarization can take some minutes. The first submissions of a new Apple team can take hours. On a timeout, run the same command again later with RESUME=1.
Check:
curl -s https://guardian.example.org/updates/macos/appcast.xml
The answer is an XML file with one <item> for each version.
Publish a new version
git pull
RELEASE_DEST=user@server:guardian/data/updates/macos make -C macos release
Kid Macs check for updates every hour and install a new version at once. The server keeps the last 5 versions.
Next: set up a kid Mac.