-
Env:
Project include
Symptoms: When attempting to execute a PyInstaller-generated Unix executable, macOS displays the following Gatekeeper warning: "Apple could not verify “FILE_NAME” is free of malware that may harm your Mac or compromise your privacy." Key Issue: While I understand that macOS Questions:
Any insights would be greatly appreciated. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Ad-hoc code signing is mandatory for all executables and binaries, and has been a while. But we do that (unless you specify actual codesign identity), so it shouldn't be a problem. I can launch built programs on my test system without running afoul of Gatekeeper. Are we talking about onefile or onedir build? Does it happen with every program (e.g., a hello world or something simpler), or just this one? Is it on the same machine, or are you transferring the file to another one (and it might have gained |
Beta Was this translation helpful? Give feedback.
That's the root of the problem, then. When a binary is downloaded, macOS applies the
com.apple.quarantine
attribute. (Likely the same if the executable was inside a .zip archive).You could have user manually remove the attribute:
xattr -dr com.apple.quarantine <filename>
(the recursive option is redundant in this case, since it's a single file).You co…