neuralinterfaces / commoners

The Cross-Platform Framework for the Web

Home Page:https://commoners.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix Signed Builds

garrettmflynn opened this issue · comments

Builds break immediately after being signed—specifically on Mac M2. Including identity: null fixes this problem—but, in the long run, will result in an inability to create applications that can be widely shared.

One possible solution is to dynamically add the identity: null declaration if the conditions for notarization aren't met on Mac, though we'll first have to check that proper notarization fixes this problem in the first place.

For further context, this also happens on my Intel Mac, though this throws a CSSMER_TP_CERT_REVOKED error that results in the same The application "X" can't be opened error appearing when the app is opened.

These resources may be helpful for resolving this issue on systems running MacOS:

  1. electron-userland/electron-builder#1046
  2. electron-userland/electron-builder#6564

This is avoided on the commoners-starter-kit because the process:

skipped macOS application code signing  reason=cannot find valid "Developer ID Application" identity or custom non-Apple code signing certificate, it could cause some undefined behaviour, e.g. macOS localized description not visible, see https://electron.build/code-signing allIdentities=     0 identities found

So at least for Github Actions, this can be subverted by setting secrets like APPLE_DEVELOPER_ID_IDENTITY_HASH, APPLE_DEVELOPER_ID_NAME, APPLE_ID, APPLE_PASSWORD, MACOS_CERTIFICATE, and MACOS_CERTIFICATE_PWD.