# Mac signing, notarization and DMG checks (SesVer) Used by section 4 step 2 of SKILL.md. - Hand the user the `store-credentials` command with their Apple ID e-mail already filled in (`xcrun notarytool store-credentials --apple-id --team-id `) and re-probe with `notarytool history` after their screenshot ("No submission history." = profile works). The profile name is product-independent; it survives a rename. - Xcode "Manage Certificates → + → Developer ID Application" failing with "This operation can only be performed by the Account Holder": have the user open developer.apple.com/account → Membership details (role, Team ID, pending-agreement banner). "Enrolled as Individual" means the Apple ID signed in there IS the Account Holder, so Xcode is signed in with another or stale Apple ID. Apple's documented web path avoids Xcode: Keychain Access → Certificate Assistant → "Request a Certificate From a Certificate Authority" saved to disk ON THE SIGNING MAC (private key stays there) → developer.apple.com/account/resources/certificates/add → Developer ID Application, G2 Sub-CA → upload CSR → download `.cer` → double-click; then re-probe `security find-identity`. - Screenshots of the developer account show the user's home address and phone: describe only what matters (team, role, enrollment type, renewal), never repeat or store the personal fields. - A product rename must land BEFORE the first signed artifacts: SignPath enforces product name metadata and the DMG/app bundle carry the name, so renaming after signing redoes both. When the user floats a new name, pause DMG/SignPath (keep the user's product-independent cert/credential steps going), and check collisions first: web search the exact name + "app"/"voice"/"TTS", app stores, domain, GitHub; a same-category rival is a real reason to rename. A name that reuses a sibling product's brand is that product PM's decision too: ask whether the user wants a brand family or just likes the word, and route the trademark/naming study to a marketing specialist (6-8 candidates with domain/GitHub/store/TÜRKPATENT/EUIPO checks) instead of picking a name yourself. - End-to-end DMG check after notarize: mount read-only, `ditto` the app to scratch, add a quarantine xattr, `spctl -a -vv` (expect "Notarized Developer ID"), launch per `docs/macos-yayin.md` with a scratch `SESVER_HOME` (APFS-cloned `.venv`) and a free port, wait for HTTP 200. Killing it afterwards with SIGTERM: builds before 1.4.0 popped a "quit unexpectedly" dialog on the user's screen (1.4.0 launcher traps SIGTERM and exits 0); on older builds close it the normal way or warn the user first. - Run `macos/release_mac.sh ` under `caffeinate -i env -u PYTHONPATH` in the release worktree; it signs, notarizes and staples in one go (a few minutes). Copy the result to a stable-name file (`SesVer-macOS.dmg`) and hand both paths + SHA256 to the publish brief. - Do not re-upload a re-signed DMG built from the same commit as the one already on the release: content is identical, only the signature and SHA change, and the release notes' SHA lines would go stale. ## Microphone (and other TCC-protected devices) - The pywebview window (WKWebView) can record only if the signed bundle has BOTH `NSMicrophoneUsageDescription` in `SesVer.app/Contents/Info.plist` AND `com.apple.security.device.audio-input` in `macos/SesVer.entitlements`. Without the plist key `navigator.mediaDevices` is undefined; with the key but no entitlement, hardened runtime makes tccd deny silently (`requires entitlement com.apple.security.device.audio-input but it is missing`, visible in `log stream --predicate 'subsystem == "com.apple.TCC"'`), no prompt is ever shown. TCC attributes the request to the responsible bundle (`SesVer.app`), so the Terminal launcher path (`MACOS_BASLAT.command`) cannot get the permission; the UI must say so. - Changing `Info.plist` invalidates the bundle signature, so the re-signed launcher binary must be committed with it even when the C source is unchanged (reverting the binary gives "invalid Info.plist (plist or signature have been modified)"). - Prove it with `release_mac.sh --dry-run`: `codesign -d --entitlements - --xml dist/SesVer.app` lists only the intended key, `plutil -extract NSMicrophoneUsageDescription raw dist/SesVer.app/Contents/Info.plist` prints the text. Record every new entitlement with its reason in `docs/macos-yayin.md` and the entitlements file comment. - The real permission prompt and recording need an unlocked screen and a human click: schedule a manual test with the user (grant on first use, not asked again in the second screen) before release. - Do not ship a website download button (OS-detecting "Windows / Mac indir") until every platform it offers has a real downloadable artifact; this user waits for the DMG rather than pointing Mac users at a ZIP.