According to this guide, there should be an App Sandbox
capability in the project file:
However, for some reason my app project does not have any App Sandbox
capability that I can turn on:
Why is it missing, and how can I get it there?
According to this guide, there should be an App Sandbox
capability in the project file:
However, for some reason my app project does not have any App Sandbox
capability that I can turn on:
Why is it missing, and how can I get it there?
First of all, you should open the ***.entitlements
file. In this file, add a Key named App Sandbox
and changed Value to YES
.
After completing the above steps, click command + b
then go back to Signing & Capabilities
, the App Sandbox
will appear.
(Straightforward to do but a pain to remember.)
.entitlements
file, create a new one:View
> Navigators
> Project
File
> New
> File...
Property List
templateMYPROJECT.entitlements
.Select the file in the Project navigator sidebar.
Add a new row (via the (+)
symbol, just as you would for a .plist
file.)
key: App Sandbox
type: Boolean
value: YES
This is the same as editing the source code (file contents) to be:
<?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>
Menu: View
> Navigators
> Project
Select the root level (project icon) of your project
In the project and targets list
(left sidebar within the editor), select the target under TARGETS (not the Project)
In the editor area, select the Build Settings
tab
Select All
(show all build settings), not Basic
In the list, find CODE_SIGN_ENTITLEMENTS
Set its value to the location of the .entitlements
file. If you created it at the root level of the project, this is just the filename, otherwise the relative folder path.
Example: butterflies.entitlements
Example: butterflies/butterflies.entitlements
I recommend then doing a Clean Build Folder
, select a suitable build platform and doing a Product Build
or Run
.
Caveat: App Sandbox
can be missing for other reasons but this is the most common one I come across.
If your Apple provisioning profile is missing the App Sandbox entitlement then it won't show up in xcode.
FYI - you can add manually to entitlement file, however it wont let you build unless described in your provisioning profile. Same goes for ditribution as well.
To Add entitlement > Open *.entitlements file as source code > add the following code.
<key>App Sandbox</key> <true/>
You can regenerate the provisioning profile with the desired capabilities, if you are the admin/team agent of the Apple store project.
hope this helps.
© 2022 - 2025 — McMap. All rights reserved.