0

i know sandbox and bundle in iOS app,but what the difference? the bundle is included in the sandbox? And hao can i get the document directory by the bundle?

3 Answers3

1

To fetch the documents directory, Use the function NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).

The return type is an array. Fetch the last object which is the only object in the array incase its an iOS app. That would be the path to your documents directory, a subset of the App Sandbox

Origin
  • 2,009
  • 5
  • 19
  • 19
user819060
  • 11
  • 2
1

I Think it can give you a big picture bundle inside sandbox

andyqee
  • 3,175
  • 3
  • 21
  • 24
0

The question haunted me too. This is what I was able to conclude. The App Bundle is a subset of the App sandbox. Consider the app folder in your simulator. The folder with the App ID (16 digit Hex) is your App Sandbox. The sandox contains your documents, library, tmp and other sub directories in addition to the app bundle (.app file). Right click the app bundle and show package contents. You would find the source code and resources that make up the app bundle.

Correct me if I am wrong.

user819060
  • 11
  • 2