Hello!
I am trying to build a CI pipeline for a safari browser extension. And in order to achieve this I am manually signing the .app.
The file that creates problems is the .appex. From "extensionName.app/Contents/PlugIns/extenstionName Extension.appex". Not signing this file causes the notarization to flag the package as invalid. The order that I achieved the signing and caused the notarisation to work is this.
(not actual signing request lines, I simplified them for easier readability)
# Signing first all the .dylib files
-timestamp --options runtime "extenstionName.app/Contents/Frameworks/*.dylib"
# Then signing the binary from the appex
--prefix=com.domain. --timestamp --options runtime "extenstionName.app/Contents/PlugIns/extenstionName Extension.appex/Contents/MacOS/extenstionName Extension"
# Then signing the .app package
--prefix=com.domain. --timestamp --options runtime "extenstionName.app/"
# And at the end signing the .appex
--prefix=com.domain. --timestamp --options runtime "extensionName.app/Contents/PlugIns/extensionName Extension.appex"
If I do the signing this way the notarization works, and the .app is code signed and can be verified. The issue is that the extension does not load at all in safari, not even with Allow Unsigned Extensions enabled. And I can't find any way to debug this. Clicking Quit and Open Safari Extensions Preferences... does nothing, nothing appears inside the Safari Extension Preferences menu.
I tried multiple combinations of signing order.
- Signing the
.appexbefore the.appcauses the code signature to not be valid at all. - Do not sign the
.appexat all causes the.appto be verified and signed but in safari you need to have unsigned extension enabled. And also the notarization fails throwing errors about the.appexthat is not signed - Not signing the binary from the
.appexcauses the notarization to fail throwing error that that binary is not signed.
Also I tried to run the signed and notarized .app on a clean macOS computer, and it does not load into safari, the same that happens on the development computer.