Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing tag in info_plist prevents resulting .app from running on Mac due to com.apple.quarantine xattr #438

Open
Shotgunosine opened this issue Nov 19, 2024 · 0 comments

Comments

@Shotgunosine
Copy link

I am trying to build an app that runs cognitive tasks. I'm building the .app file with PyInstaller 6.9.0 on an Intel Mac running Sonoma (14.7). Participants will be downloading the task from a website after completing a survey, and I want to embed a unique participant id into each .app before packaging it in a dmg for download so that the results of the task can be linked to the results of the survey and participants don't have to enter a code manually (which can be error prone). I'm accomplishing this by building the app with a WorkerID field in the plist of the same length as the worker ids generated by the website. When I try downloading and running a .app file that I've modified with pefile, I get a message saying:

“SUPREME.app” is damaged and can’t be opened. You should eject the disk image.

When I check the xattrs of the .dmg, sure enough, it's got a quarantine tag:

nielsond$ xattr SUPREME.dmg
com.apple.macl
com.apple.metadata:kMDItemWhereFroms
com.apple.quarantine
nielsond$ xattr -p com.apple.quarantine SUPREME.dmg
0081;673ba95b;Chrome;

I'm running the webpage from the Python 3.12 docker image and using pefile 2024.8.26.
The code for the .app is here: https://github.com/compmem/cogmood
The code where I'm editing the .app is here: https://github.com/Shotgunosine/cogmood_backend/blob/e3e5231f0a3db123ca8b9654c1093e5ada071015/app/utils.py#L98-L114

Is there anyway to edit the information in info_plist without triggering the quarantine flag?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant