# UE5.3 Modernized Xcode MacOS Distribution Sandbox Error

**URL:** <https://forums.unrealengine.com/t/ue5-3-modernized-xcode-macos-distribution-sandbox-error/1333124>\
**Category:** Platform & Builds\
**Tags:** xcode, MAC, unreal-engine\
**Created:** [October 15, 2023, 9:45am UTC](https://forums.unrealengine.com/t/ue5-3-modernized-xcode-macos-distribution-sandbox-error/1333124 "2023-10-15T09:45:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tiefsignal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tiefsignal](https://forums.unrealengine.com/u/Tiefsignal)\
**Post date:** [October 15, 2023, 9:45am UTC](https://forums.unrealengine.com/t/ue5-3-modernized-xcode-macos-distribution-sandbox-error/1333124/1 "2023-10-15T09:45:42Z")

</div>

Archiving my MacOS Project in Xcode and upload it to AppStoreConnect results in a Sandbox error:

App sandbox not enabled. The following executables must include the “com.apple.security.app-sandbox” entitlement with a Boolean value of true in the entitlements property list:

Screenshot of Error:

 ![Bildschirmfoto 2023-10-15 um 11.40.09](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/7/c/77c4f73660bbafedd387f6a745702e40752a0de1.png)

In the Package Review I can see that the correct sandbox entitlement is set to true.  
Screenshot of Package Review:

 ![Bildschirmfoto 2023-10-15 um 11.33.55](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/1/f/41f40c056e6573db5fe136669562d5bf657bd9c9.png)

Although not all sub executables have that entitlement. I marked with a red arrow the ones that not have the entitlement.  
Screenshot of Package Review:

 ![Bildschirmfoto 2023-10-15 um 11.34.27](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/a/5/6a5f9c383c9eeaf82b270a75c5f809c9b6076cbe.png)

How can I add the entitlement to those Executables?  
Enable Sandbox is set to true.

Thank you for your help. I have already spent days on that problem.

---

<div class="post-metadata">

**Author:** ![JPGRIGS](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@JPGRIGS](https://forums.unrealengine.com/u/JPGRIGS)\
**Post date:** [November 6, 2023, 10:28pm UTC](https://forums.unrealengine.com/t/ue5-3-modernized-xcode-macos-distribution-sandbox-error/1333124/2 "2023-11-06T22:28:15Z")

</div>

Have there been any developments on this issue? I am running into the same problem.

---

<div class="post-metadata">

**Author:** ![Tiefsignal](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tiefsignal](https://forums.unrealengine.com/u/Tiefsignal)\
**Post date:** [November 10, 2023, 8:17am UTC](https://forums.unrealengine.com/t/ue5-3-modernized-xcode-macos-distribution-sandbox-error/1333124/3 "2023-11-10T08:17:13Z")

</div>

No I still have the same issue.  
IOS works fine meanwhile in UE5.3 with some additional installations from GitHub. MacOS doesn’t work due to that sandbox error.

---

<div class="post-metadata">

**Author:** ![B\_REX](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/b_rex/32/982590_2.png) [@B\_REX](https://forums.unrealengine.com/u/B_REX)\
**Post date:** [December 11, 2023, 5:38pm UTC](https://forums.unrealengine.com/t/ue5-3-modernized-xcode-macos-distribution-sandbox-error/1333124/4 "2023-12-11T17:38:20Z")

</div>

Have you been able to find a solution? We are also running into that problem now.

---

<div class="post-metadata">

**Author:** ![B\_REX](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/b_rex/32/982590_2.png) [@B\_REX](https://forums.unrealengine.com/u/B_REX)\
**Post date:** [December 12, 2023, 5:33pm UTC](https://forums.unrealengine.com/t/ue5-3-modernized-xcode-macos-distribution-sandbox-error/1333124/5 "2023-12-12T17:33:51Z")

</div>

Okay, I found a way to fix it. Be prepared for some annoying stuff…  
For me it only complained about the EpicWebHelper. (I am running UE 5.3.2)

You have to add the Entitlement to the EpicWebHelper. To do this, you have to codesign the EpicWebHelper.app provided in the engine before you package the game.

I wrote a sh script to do this:

```auto
WebHelper="/PathToEngine/Engine/Binaries/Mac/EpicWebHelper.app"

Certificate="Developer ID Application: Your Certificate Name ( ********* )"
entitlement="Path/To/Entitlements/File/Sandbox.entitlements"

#printf "\n------ Codesign WebHelper ------\n"
codesign --force --deep -s "$Certificate" --options=runtime --timestamp --entitlements $entitlement -v $WebHelper"/Contents/MacOS/EpicWebHelper"
codesign --force --deep -s "$Certificate" --options=runtime --timestamp --entitlements $entitlement -v $WebHelper

```

Then you have to have create the Sandbox.entitlements file that is used in the script:

```auto
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>com.apple.security.app-sandbox</key>
	<true/>
</dict>
</plist>

```

Finally execute the sh script.

Please note:  
Your entitlements file may have to include other entitlements as well.  
Also I am not to sure if everything is needed for the codesign commands and if the parameters are appropriate… but it worked.

---

<div class="post-metadata">

**Author:** ![mohanghimire](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mohanghimire](https://forums.unrealengine.com/u/mohanghimire)\
**Post date:** [March 27, 2024, 8:34pm UTC](https://forums.unrealengine.com/t/ue5-3-modernized-xcode-macos-distribution-sandbox-error/1333124/6 "2024-03-27T20:34:51Z")

</div>

Hi, @B_REX  
I am developing on Unreal 5.2. My game run successfully in Mac and I am successfully able to distribute externally in Mac however while uploading the game to the Mac App store, the com.apple.security.app-sandbox needs to set to true in entitlements.  
If i do this then the game doesn’t run and quits unexpectedly.  
And my prime suspect is EpicWebHelper because prior to this the game was running fine.  
After using EpicWebHelper plugin and with com.apple.security.app-sandbox set to true, it is not running.  
Can you let me know, what are the things that you had done to run the game successfully?

---

<div class="post-metadata">

**Author:** ![mathieugarcia](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mathieugarcia](https://forums.unrealengine.com/u/mathieugarcia)\
**Post date:** [December 28, 2024, 8:43am UTC](https://forums.unrealengine.com/t/ue5-3-modernized-xcode-macos-distribution-sandbox-error/1333124/7 "2024-12-28T08:43:09Z")

</div>

Hi,

Like you, my game is fine with tested locally but crashes when distributed on TestFlight.  
The crash report are pretty much useless - some memory correction in a thread I can’t really track.

Has any of you made progress on this ?

Thank you !
