6.1 · The process, the sandbox, entitlements and privacy prompts

Before any of your code runs, the system has already decided what your process may touch. These questions are about that boundary: what the operating system enforces on you, and what you must ask for.

Mental model. An iOS app is a signed program in a locked room. The room (sandbox), the keys it is allowed (entitlements) and the permissions the user grants (privacy prompts) are three separate checks, made by different parts of the system.

Process and sandbox

What an app process is, and where its files live.

  1. What is the iOS process model, and what can an app process not do? 6.1.1 · L3
    Each app runs as its own process with a private virtual address space, started by the system (via launchd and the runtime that supervises apps) when the user…
  2. What is the app container, and why must you never persist an absolute path? 6.1.2 · L2
    The sandbox gives every app two containers. The bundle container holds the signed .app (read-only). The data container holds everything the app writes…

Permission to act

Entitlements that the system grants, and privacy consent the user grants.

  1. What are entitlements, and what happens when they do not match the provisioning profile? 6.1.3 · L3
    An entitlement is a signed key-value pair embedded in your app’s code signature that grants a capability the sandbox would otherwise deny: push notifications…
  2. How do privacy permissions work, and what do you do after the user says no? 6.1.4 · L3
    Access to the camera, microphone, photos, contacts, location, Bluetooth, tracking and similar data is controlled by the system’s consent layer (historically…

More in iOS platform internals