Hi,
I am creating a plug-in written in a combination of Objective-C and Swift. As such, the bundle contains the following structure:
/Contents/Frameworks/libswiftCore.dylib (and few other Swift's dylib files)
/Contents/Info.plist
/Contents/MacOS/MainProductBinary
/Contents/Resources/ - contains pdfs, nibs etc.
1. I've codesigned and notarized each *.dylib file individually
2. I've codesigned and notarized the bundle as a whole
3. I've packed the bundle and transfered via web (so it becomes quarantined) to a fresh Catalina virtual machime
4. I've installed the third-party host application for which the our product is a plug-in onto the Catalina virtual machine
5. I've placed the plug-in into a folder where the host application expects it
When I start the host application, Gatekeeper complaines that it cannot check the bundle for malvare.
I manually assess the *.dylib files using a Terminal using the commands bellow:
for filename in MyPlugin.bundle/Contents/Frameworks/*.dylib; do
spctl --assess --verbose=4 --type install "$filename"
done
After running these commands, Gatekeeper becomes satisfied and allows the plug-in to run when I start the host application.
However, I'm not a supporter of an idea to force users to run these commands before installing the plug-in.
Additional notes:
- Running spctl --assess --type install on the whole bundle before manually assessing the *.dylib files reports "rejected". However, running the same command after manually assessing the *.dylib files reports "accepted".
What should I do to make Gatekeeper satisfied without the need to run these commands?
Thanks for your collaboration. After changing the deployment target to 10.14.4 so Swift libraries not being included in the bundle, the Gatekeeper seems to let the plug-in run and the stapler checking tool reports Accepted. Even that the ticketContents still does not contain the overall bundle entry.
I made no other change to the code nor to the commands to build and notarize the bundle.
However, I finally found how to force the notarization service to recognize the overall bundle. The notarization service started to list the overall bundle as well as the Gatekeeper becomes satisfied (even after lowering back to 10.14 so Swift libraries becomes present again) after I added CFBundlePackageType: BNDL into Info.plist. Strange that the notarization service depends on it as if I understand docs correctly, macOS should default to BNDL if the key is not found or not recognized.
Thanks for your collaboration in triggering this issue.