Skip to content

Commit 57384b8

Browse files
authored
Merge pull request #7170 from Calinou/running-on-mac-path-randomization
Document bypassing Gatekeeper path randomization in Running on macOS
2 parents e6dbfe1 + 2d4f9e6 commit 57384b8

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

tutorials/export/running_on_macos.rst

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ Running Godot apps on macOS
1010

1111
By default, macOS will run only applications that are signed and notarized.
1212

13+
.. note::
14+
15+
When running an app from the Downloads folder or when still in quarantine,
16+
Gatekeeper will perform *path randomization* as a security measure.
17+
This breaks access to relative paths from the app, which the app relies upon to work.
18+
To resolve this issue, move the app to the ``/Applications`` folder.
19+
20+
In general, macOS apps should avoid relying on relative paths from the
21+
application folder.
22+
1323
Depending on the way a macOS app is signed and distributed, the following scenarios are possible:
1424

1525
App is signed, notarized and distributed via App Store
@@ -78,7 +88,7 @@ password, and then the **Anywhere** option will be available:
7888

7989
Note that Gatekeeper will re-enable itself when macOS updates.
8090

81-
App is not-signed, executable is linker-signed
91+
App is not signed, executable is linker-signed
8292
----------------------------------------------
8393

8494
.. note::
@@ -91,15 +101,15 @@ When you run the app for the first time, the following dialog is displayed:
91101

92102
To run this app, you should remove the quarantine extended file attribute manually:
93103

94-
* Open ``Terminal.app`` (press ``Cmd + Space``, and enter ``Terminal``).
104+
* Open ``Terminal.app`` (press :kbd:`Cmd + Space` and enter ``Terminal``).
95105

96106
* Navigate to the folder containing the target application.
97107

98108
Use the ``cd path_to_the_app_folder`` command, e.g. ``cd ~/Downloads/`` if it's in the ``Downloads`` folder.
99109

100110
* Run the command ``xattr -dr com.apple.quarantine "Unsigned Game.app"`` (including quotation marks and ``.app`` extension).
101111

102-
Neither app nor executable is signed (relevant for Apple Silicon macs only)
112+
Neither app nor executable is signed (relevant for Apple Silicon Macs only)
103113
---------------------------------------------------------------------------
104114

105115
.. note::
@@ -114,7 +124,7 @@ To run this app, you can ad-hoc sign it yourself:
114124

115125
* Install ``Xcode`` for the App Store, start it and confirm command line tools installation.
116126

117-
* Open ``Terminal.app`` (press ``Cmd + Space``, and enter ``Terminal``).
127+
* Open ``Terminal.app`` (press :kbd:`Cmd + Space` and enter ``Terminal``).
118128

119129
* Navigate to the folder containing the target application.
120130

0 commit comments

Comments
 (0)