running_on_mac.rst 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. .. _doc_running_on_mac:
  2. Running Godot apps on macOS
  3. ===========================
  4. By default, macOS will run only applications that are signed and notarized.
  5. Depending on the way a macOS app is signed and distributed, the following scenarios are possible:
  6. App is signed, notarized and distributed via App Store
  7. ------------------------------------------------------
  8. .. note::
  9. App developers need to join the Apple Developer Program, and configure signing and notarization options during export, then upload the app to the App Store.
  10. The app should run out of the box, without extra user interaction required.
  11. App is signed, notarized and distributed outside App Store
  12. ----------------------------------------------------------
  13. .. note::
  14. App developers need to join the Apple Developer Program, and configure signing and notarization options during export, then distribute the app as ".DMG" or ".ZIP" archive.
  15. When you run the app for the first time, the following dialog is displayed:
  16. .. image:: img/signed_and_notarized_0.png
  17. Click ``Open`` to start the app.
  18. If you see the following warning dialog, your Mac is set up to allow apps only from the App Store.
  19. .. image:: img/signed_and_notarized_1.png
  20. To allow third-party apps, open ``System Preferences``, click ``Security & Privacy``, then click ``General``, unlock settings, and select ``App Store and identified developers``.
  21. .. image:: img/sys_pref_0.png
  22. App is signed (including ad-hoc signatures) but not notarized
  23. -------------------------------------------------------------
  24. .. note::
  25. App developer used self-signed certificate or ad-hoc signing (default Godot behavior for exported project).
  26. When you run the app for the first time, the following dialog is displayed:
  27. .. image:: img/signed_0.png
  28. To run this app, you can temporarily override Gatekeeper:
  29. * Either open ``System Preferences``, click ``Security & Privacy``, then click ``General``, and click ``Open Anyway``.
  30. .. image:: img/sys_pref_1.png
  31. * Or, right-click (Control-click) on the app icon in the Finder window and select ``Open`` from the menu.
  32. .. image:: img/signed_1.png
  33. * Then click ``Open`` in the confirmation dialog.
  34. .. image:: img/signed_2.png
  35. * Enter your password if you're prompted.
  36. Another option is to disable Gatekeeper entirely. Note that this does decrease
  37. the security of your computer by allowing you to run any software you want.
  38. To do this, run ``sudo spctl --master-disable`` in the Terminal, enter your
  39. password, and then the **Anywhere** option will be available:
  40. .. image:: img/macos_allow_from_anywhere.png
  41. Note that Gatekeeper will re-enable itself when macOS updates.
  42. App is not-signed, executable is linker-signed
  43. ----------------------------------------------
  44. .. note::
  45. App is built using official export templates, but it is not signed.
  46. When you run the app for the first time, the following dialog is displayed:
  47. .. image:: img/linker_signed_1.png
  48. To run this app, you should remove the quarantine extended file attribute manually:
  49. * Open ``Terminal.app`` (press ``Cmd + Space``, and enter ``Terminal``).
  50. * Navigate to the folder containing the target application.
  51. Use the ``cd path_to_the_app_folder`` command, e.g. ``cd ~/Downloads/`` if it's in the ``Downloads`` folder.
  52. * Run the command ``xattr -dr com.apple.quarantine "Unsigned Game.app"`` (including quotation marks and ``.app`` extension).
  53. Neither app not executable is signed (relevant for Apple Silicon macs only)
  54. ---------------------------------------------------------------------------
  55. .. note::
  56. App is built using custom export templates, compiled using OSXCross, and it is not signed at all.
  57. When you run the app for the first time, the following dialog is displayed:
  58. .. image:: img/unsigned_1.png
  59. To run this app, you can ad-hoc sign it yourself:
  60. * Install ``Xcode`` for the App Store, start it and confirm command line tools installation.
  61. * Open ``Terminal.app`` (press ``Cmd + Space``, and enter ``Terminal``).
  62. * Navigate to the folder containing the target application.
  63. Use the ``cd path_to_the_app_folder`` command, e.g. ``cd ~/Downloads/`` if it's in the ``Downloads`` folder.
  64. * Run the following commands:
  65. ``xattr -dr com.apple.quarantine "Unsigned Game.app"`` (including quotation marks and ".app" extension).
  66. ``codesign -s - --force --deep "Unsigned Game.app"`` (including quotation marks and ".app" extension).