2

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 ?

  • Apple issues code signing certificates to paid developers. Can you edit if you need help with the developer program - if so, this is on topic here. If you want to generate a self signed cert - that might be OK here - might be on stack overflow - but let’s refine what your setup is so we can migrate or re-open this for answers. Great start to a question! – bmike Jul 9 at 18:01
  • Is a self signed certificate is Ok to distribute my python package to other mac systems? 1. I need to generate a certificate and code sign my package, can you please let me know what kind of information you need so that i can provide the same 2.And I don't need my package to be on the store because it is just a dependency for another electron js application. and also let me know whether self signed cert is enough for the same @bmike – chitharthan Jul 10 at 5:56
  • No. If "other Mac systems" mean Macs that have no reason to trust you (i.e. that is not owned by you) then "self signed cert" as in a certificate generated by signing itself with its own key will do nothing to identify you as an "identified developer" You can get certificates for codesigning without Xcode by logging into the developer portal and navigating to Certificates and Profiles but Xcode automatically does ihis if you've ever logged into your account and built anything using your team id – kumowoon1025 Jul 16 at 13:36
2

You can code sign your distribution manually using the codesign tool. Apple's Code Signing Guide includes a section on manually signing code:

Signing Your Code Manually

… In the unusual case that you sign your code manually, or to interrogate an app for details about its signature, you use the codesign command line tool directly. See the codesign man page for a complete enumeration of the options this tool takes.

Depending on the complexity of the bundle being signed, the final command typically looks like:

codesign -s <identity> <absolute-bundle-path>

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.

| improve this answer | |
0

You can only be an identified developer by paying Apple $99 per year.

| improve this answer | |
  • Yeah Im having it from my colleague thanks – chitharthan Jul 17 at 5:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .