<!--
{
  "documentType" : "article",
  "framework" : "Security",
  "identifier" : "/documentation/Security/app-sandbox",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "App Sandbox"
}
-->

# App Sandbox

Restrict access to system resources and user data in macOS apps to contain damage if an app becomes compromised.

## Overview

App Sandbox provides protection to system resources and user data by limiting your app’s access to resources requested through entitlements.

> Important:
> To distribute a macOS app through the Mac App Store, you must enable the App Sandbox capability.

## Topics

### Essentials

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.security.app-sandbox>

[Protecting user data with App Sandbox](/documentation/Security/protecting-user-data-with-app-sandbox)

Guard user data and operating system resources from malicious attacks by limiting your app’s access to files, network connections, and hardware capabilities.

  <doc://com.apple.documentation/documentation/Xcode/embedding-a-helper-tool-in-a-sandboxed-app>

[Discovering and diagnosing App Sandbox violations](/documentation/Security/discovering-and-diagnosing-app-sandbox-violations)

Determine when your macOS app behaves incorrectly because of a sandbox violation, and fix sandbox-related issues.

### Network

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.security.network.server>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.security.network.client>

### Hardware

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.security.device.camera>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.security.device.microphone>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.security.device.usb>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.security.print>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.security.device.bluetooth>

### App Data

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.security.personal-information.addressbook>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.security.personal-information.location>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.security.personal-information.calendars>

### File Access

[Accessing files from the macOS App Sandbox](/documentation/Security/accessing-files-from-the-macos-app-sandbox)

Read and write documents and supporting files while maintaining security protection.

[Migrating your app’s files to its App Sandbox container](/documentation/Security/migrating-your-app-s-files-to-its-app-sandbox-container)

Simplify your app’s access to documents and supporting files.

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.security.files.user-selected.read-only>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.security.files.user-selected.read-write>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.security.files.downloads.read-only>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.security.files.downloads.read-write>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.security.assets.pictures.read-only>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.security.assets.pictures.read-write>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.security.assets.music.read-only>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.security.assets.music.read-write>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.security.assets.movies.read-only>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.security.assets.movies.read-write>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.security.files.all>

  <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/NSAppDataUsageDescription>



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)