Search Issue Tracker

Won't Fix



Found in







Issue ID




[macOS] "build is damaged and cannot be opened" error when downloading Unity build from internet



Reproduction steps:
1. Create a new project
2. Build for Mac
3. Upload build online to Google Drive
4. Download the build (Google Drive will zip it before download)
5. Unzip the build and execute command "sudo chmod -R 755 <path to build>" in terminal (read note 1 for info)
6. Launch the build

Expected result: The build launches successfully
Actual result: ["build" is damaged and can't be opened. You should move it to the Bin.] error window appears

Workaround: execute "xattr -cr <path to build>" and the application will launch

Reproducible with: 2018.4.0f1, 2018.4.33f1, 2019.4.22f1, 2020.3.2f1, 2021.1.0a2, 2021.1.0f1, 2021.2.0a10
Not reproducible with: 2021.1.0a1

1. If not executing "sudo chmod -R 755 <path to app>" on the unzipped app you might get an error "opening the app requires administrator permissions"
2. The issue is the same as described in 1304455

  1. Resolution Note (2021.2.X):

    The included project modifies files in the application bundle ( in OnPostProcessBuild, after Unity signs it. This invalidates the signature, causing macOS think that the app is damaged.

    When modifying files in the built game bundle in OnPostProcessBuild, you should resign the modifies bundle using this editor API:


    You may also resign it using command line codesign tool on macOS:

    codesign -s - -f --deep /path/to/

    There is a closely related issue that causes the command line tool to fail resigning the application bundle after Unity signs it, so the second option will not work until that is fixed:

Comments (2)

  1. ribbonrainbow

    Oct 24, 2021 20:01

    I answered with my fix here: and scroll to the bottom

  2. samanabo

    May 25, 2021 21:09

    Is this no longer an issue because the related issue was fixed? Or will mac builds still show this error?

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.