Search Unity

macOS builds downloaded from the Internet are quarantined and can't be run on Big Sur

Discussion in 'macOS' started by r618, Jan 21, 2021.

  1. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,305
    (not sure if Universal makes a difference or not in fact)
    Big Sur displays just standard warning dialog
    upload_2021-1-21_19-33-6.png
    without any option to run the app

    currently it's enough to dequarantine the app folder e.g.:

    xattr -d com.apple.quarantine AudioStreamDemo.app

    Build is Universal, made in 2020.2.1, macOS 11.1, Intel Mac
    Not sure if it's Unity or macOS problem but thought it's worth mentioning
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Did you code-sign your app?
     
  3. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,305
    No and I don't see why
    That's not something a user should be doing when distributing outside of any [app]store as this is fully in competence of engine

    It might go away with next OS point update, but if not, the player will have to be built at least to the state which will allow OS to display dialog with meaningful action without resorting to command line
    I still think it's most likely just a temporary bug, but it's probably worth for e.g. @Tautvydas-Zilys to be aware of
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    See https://forum.unity.com/threads/compressed-app-becomes-corrupted-on-other-devices.1039690/

    It's a known bug (which we discovered only recently), tracked here: https://issuetracker.unity3d.com/issues/macos-builds-now-contain-a-quarantine-attribute

    The issue here is that we upgraded our toolchain to Xcode 12, which automatically signs binaries (and in fact that's required to run on the new Apple silicon devices). However, if your binaries are signed, but you modify your .app afterwards (like Unity does when assembling the game files), the OS thinks that the whole app bundle is "tampered with" and if it contains a quarantine attribute, it will refuse to run. Fortunately, this is only an issue if you download the app from a browser as a zip file: other distribution methods like Steam don't suffer from it. Furthermore, it can be worked around by doing "codesign --deep -s - -f path/to/game.app"

    This is very high on our priorities list to fix.
     
    r618 likes this.
  5. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,305
    Thank you for explanation!
    Just a heads up - after code signing with defaults as per above it gets slightly different - but still unusable - warning
    upload_2021-1-22_14-2-58.png
    this is probably due to my cert/identity not being proper distribution one right now (but idk for sure, haven't investigated further)
    So yeah it would probably best if Unity solved this entirely since otherwise all devs would most likely need proper distribution certificate even for ad hoc public builds

    manual dequarantining still works for now
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    If you right click and click open (instead of double clicking on it), it should allow you to.
     
  7. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,305
    ahh right completely forgot about it - thanks !
    - so can confirm works overall w/ signing