When we execute the below code with developer profile
[[NSFileManager defaultManager] directoryContentsAtPath:@"/"]
, why would we see all folders and files. Does it mean we can access view all the folders, even though iOS apps. work in Sandbox.?
Does it mean we can access view all the folders, even though iOS apps.
No. iOS only guarantees that you’ll be able to access files within your app’s container (and any shared containers you support via the shared app groups feature). The sandbox could potentially block any access outside of those locations.
Right now the sandbox does not actually block all such accesses — which is why you’re able to iterate the contents of the root directory — but that’s just an implementation detail.
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"