Distributing macOS .app Bundles¶
This guide covers how a protected macOS application reaches your customer and runs, from the download all the way to launch.
A .app is a folder, so it travels as a .app.zip¶
A macOS .app is a bundle: a directory that Finder treats as a single application.
A download is a single file, not a folder, so PyLocket delivers a protected .app
as a .app.zip. This is the standard way macOS apps are distributed outside the
App Store.
When the customer downloads it:
- Most browsers (Safari, Chrome) expand the
.app.zipautomatically into the runnable.app. - If a browser does not auto-expand it, one double-click in Finder runs Archive
Utility and produces the
.app. - The PyLocket Installer and Hub download and expand it for the customer with no manual step at all, once you have signed and notarized the app and uploaded the signed copy (see PyLocket Installer and Hub).
Do not rename the .app.zip to .app
A .app-named file that is actually a zip will not launch, because macOS expects
anything named .app to be a folder. Let the customer (or the Installer) unzip it
so they get a real .app folder.
Uploading your build for protection¶
Upload the .app bundle itself (PyLocket zips it for you internally):
- PyInstaller windowed GUI app: build with
--windowed, then upload the resultingYourApp.app. - Briefcase: upload the
.appit produces directly. - cx_Freeze / onedir: zip the output directory and upload the
.zip.
PyLocket protects the Python bytecode inside the bundle and returns a protected
.app (delivered as .app.zip) that runs the same way the original did.
Running the app on the customer's Mac¶
PyLocket does not sign or notarize your app. What the customer sees depends on whether you did:
- If you signed and notarized the app with your own Apple Developer ID (see Code Signing) and uploaded the signed copy, Gatekeeper accepts a browser download with at most its standard one-time confirmation, and the PyLocket Installer and Hub install it and it launches with no prompt.
- If the app is not signed with your Developer ID, macOS blocks a browser download as an app it cannot verify. On macOS 15 and later the customer has to open System Settings → Privacy & Security and click Open Anyway (the older right-click → Open shortcut no longer works). The PyLocket Installer and Hub refuse to install it at all.
For the smoothest experience, sign and notarize the app, upload the signed copy, and deliver it through the PyLocket Installer or Hub.
Sign and notarize with your own Apple Developer ID¶
Signing and notarizing is what removes Gatekeeper friction for your customers, and
it is your step: PyLocket does not sign or notarize your app. It lays out the
protected .app so it is ready to sign with your certificate. PyLocket's runtime
files (_pylocket_rt and _pylocket_prompt) are code-signed by Lamaute Labs, not
by you: sign everything else and leave those as they are. See
Code Signing for the full walkthrough, including the one
entitlement you must add because PyLocket's runtime library carries that other
signature.
Once you have a signed copy, upload it back to PyLocket using Replace with Signed Package so the signed version is what your customers download. See Replace with Signed Package.
Related¶
| Topic | Link |
|---|---|
| Sign and notarize your app | Code Signing |
| Upload your signed copy | Replace with Signed Package |
| Zero-manual-step install | PyLocket Installer and Hub |
| Multi-OS publishing | Multi-OS Publishing |