# Mac DMG packaging ```sh just dmg 0.1.0 1 ``` The recipe builds the existing Mac Catalyst destination in Release for Apple Silicon only (`ARCHS=arm64`) and packages the archived app in a compressed DMG with an Applications shortcut, `LICENSE` and `NOTICE`. It uses the same Apple Development signing setup as `just mac`. No Developer ID certificate, notary profile, notarization submission, stapling or Gatekeeper acceptance check is required or performed. ## Local setup Install an Apple Development certificate with its private key and configure its team in Xcode's accounts. The team is inferred by the existing `Scripts/read_development_team.py` helper. If multiple teams exist, set `HYDRAULOPHONE_DEVELOPMENT_TEAM` to choose one. Xcode selects the signing certificate; packaging reuses that exact certificate, including when multiple certificates belong to the same team. Provisioning updates default to on. Set `HYDRAULOPHONE_ALLOW_PROVISIONING_UPDATES=0` to use installed profiles only. No passwords, private keys or provisioning profiles belong in the repository. ## Signing and Keychain The app retains its team identity, application identifier, embedded development profile and private Keychain access group. The packaged copy removes debugger access entitlements and is re-signed with hardened runtime. Signature and architecture checks run before packaging; the DMG signature and disk-image checksum are verified before the final file is published. CarPlay remains excluded from Catalyst. The Catalyst entitlement file explicitly signs the application and team identifiers, matching Oesap's configuration. The build uses the host Mac destination, as Oesap's `mac-build` does. Before creating the DMG, `Scripts/check-mac-keychain` compiles a separately signed probe with the app's public certificate, entitlements and embedded profile. It adds, reads, updates and deletes a uniquely named synthetic Keychain item. It never launches Hydraulophone or queries its YouTube/Last.fm credential services. The probe must pass before a final DMG is published. The GPL-3.0 probe is adapted from `~/Code/oesap/Scripts/check-mac-keychain` at commit `7f6cdbc955746a91fb66c89ad8faec63fa9d7713`. Only its app labels and synthetic-item namespace were changed. Oesap's existing signed app embeds a profile specifically for `com.oesap.app`; that profile cannot authorize Hydraulophone's different bundle identifier. This is a **development-signed, unnotarized build**. Development provisioning restrictions still apply, including profile expiry and any registered-device requirements. A free Personal Team build is not validated for unrestricted distribution to other Macs. Removing notarization does not remove those restrictions or prove that recipients can access the app's Keychain group. Validate sign-in, restore after quitting and sign-out on each intended test Mac. Downloaded unnotarized apps can require explicit approval in System Settings → Privacy & Security. [Apple's instructions](https://support.apple.com/en-nz/102445). Broad distribution with Developer ID signing can be added when that identity is available; it is not part of this command. The output is `.build/releases/Hydraulophone-VERSION-BUILD.dmg`. A separate work directory retains the original archive, dSYMs and signing records. Existing final artifacts are never overwritten. Increment the build number for each release and publish the matching GPL-3.0 corresponding source alongside the DMG. Earlier unsigned Release build checks passed for Apple Silicon Catalyst and the iOS Simulator, including bundle version/architecture checks and strict Swift lint. On 2026-10-05, local orchestration checks passed for inferred-team signing, certificate reuse, preserved Keychain/profile data, removal of debugger access, absence of notarization calls, overwrite refusal and Intel rejection. The actual signed archive attempt stopped because Xcode reported no signed-in account and no matching Mac Catalyst development profile. No DMG was produced by that run. Keychain behavior on recipients' Macs remains a separate runtime validation requirement.