I have written a python script and bundled it using the PyInstaller.
The executable file inside the dist folder works fine on my Mac. But not on someone else's Mac even if they've set "App Store and identified developers".
So it seems I require Apple Developer ID and credentials. Please let me know how to create certificate for the same and code sign my package.
Can I do it without Xcode ?
Best Answer
You can code sign your distribution manually using the
codesign
tool. Apple's Code Signing Guide includes a section on manually signing code:Depending on the complexity of the bundle being signed, the final command typically looks like:
identity
refers to the common name of the signing certificate. For distribution on computers you do not control, you will want to issue an Apple Developer ID using Apple's developer web site.Notarizing
Once your bundle is code signed, you should ask Apple services to notarize it, see Notarizing macOS Software Before Distribution. This will remove the first run message from Apple warning about possible malware.
As with code signing, a command line approach exists using
altool
, see Customizing the Notarization Workflow.