A developer reads about iOS App Sandbox and wants to understand what the sandbox prevents. Which action is an iOS third-party app PROHIBITED from doing due to sandbox restrictions, even with appropriate entitlements?
- A.A. Accessing its own Documents directory to store user files
- B.D. Using Core Data to store structured data in the app's private container
- C.C. Making outbound network connections to the app's own server
- D.B. Reading the contents of another app's private sandbox directory directly through file system access, even if both apps are from the same developer and are installed on the same device
Why D is correct
iOS's app sandbox strictly isolates each app's container. An app's private sandbox (its container directory: /var/mobile/Containers/Data/Application/[UUID]/) is accessible only to that app's process. Even apps from the same developer cannot directly access each other's sandbox directories. Same-developer apps can share data through App Groups (using a shared container enabled by the com.apple.security.application-groups entitlement) or through Keychain sharing (using the keychain-access-groups entitlement). Direct cross-app file system access is explicitly prohibited regardless of entitlements.
Know someone studying for Mobile Security Fundamentals? Send them this one.