15

Is there anything like sandboxing an iPhone Application, what are the benefits on using sandboxes and do they allow me sharing data between one app and another?

I found this link while searching but not able to understand as I'm new to iOS development.

http://www.iphonedevsdk.com/forum/iphone-sdk-development/56207-what-is-sandbox-in-iphone.html

user1614347
  • 179
  • 1
  • 1
  • 6

4 Answers4

27

From The iOS Environment

For security reasons, iOS places each app (including its preferences and data) in a sandbox at install time. A sandbox is a set of fine-grained controls that limit the app’s access to files, preferences, network resources, hardware, and so on. As part of the sandboxing process, the system installs each app in its own sandbox directory, which acts as the home for the app and its data.

one solution to transmit data from one to another app is via URL Schemes

CarlJ
  • 9,461
  • 3
  • 33
  • 47
  • Hi @CarlJ, I'm looking for Apple's official documentation on sandboxing. The link you provided is now broken. Do you know where this documentation has been moved? – Mig82 Feb 21 '19 at 19:26
  • For some reason I can't find any official documentation by Apple explaining app sandboxing. However, I have found [one book online where this same statement can still be found](https://books.google.es/books?id=U8l-DwAAQBAJ&pg=PA39). – Mig82 Jun 06 '19 at 11:47
  • @Mig82 how about this one: https://developer.apple.com/app-sandboxing/ ? – CarlJ Jul 22 '19 at 11:05
  • 2
    @CarlJ I had found these docs before, but _none_ of it seems to be related to **iOS**. It's all related to **MacOS**. – Mig82 Jul 23 '19 at 14:59
6

Mobile device application developers use the sandboxing capability of iOS to ensure the security of the user data and to ensure that the application don't share data with other applications installed on the same device.

  • The sandbox forms and maintains a private environment of data and information for each app.

  • The sandbox can minimize the damage that can be done from a potential hacker but it can't prevent the attack from happening.

  • Although Apple has built robust sandboxing features into iOS , it is upto the developer's to ensure that their apps are written securely.

  • When an app is installed on a mobile device, the system creates a unique directory for it.

  • Sandboxing only prevents the hijacked app from affecting the other apps and also other parts of the system.

Hsaka
  • 61
  • 1
  • 1
2

iPhone apps are all sandboxed, meaning there is no sharing of files between applications.

There are some ways of transferring data between applications but they're very limited. Look at URL schemes.

http://wiki.akosma.com/IPhone_URL_Schemes

stevex
  • 5,589
  • 37
  • 52
2

The apps are in sandbox by default. You do not need to worry about putting it in a sandbox manually.