Copy file to app Sandbox documents?

Discussion in 'iOS Programming' started by SmartiOS, Mar 27, 2013.

  1. SmartiOS, Mar 27, 2013
    Last edited: Mar 28, 2013

    SmartiOS macrumors newbie

    Joined:
    Jul 13, 2012
    #1
    EDIT:
    All installed new app have an ID or that called sandbox. is there possible way to copy file from root to sandbox app documents?

    Here what i'm trying to do...
    root: "Applications/MyApp.app/Data.txt"

    Copy Data.txt file to this path will be fine.
    Home: "/Applications/7AC2295E-2775-41EA-B017-AB4048A09F0C*​/Document/"

    Next time "7AC2295E-2775-41EA-B017-AB4048A09F0C*" path will change after delete and install it again. So now how to get that path if that number-number-number-number sandbox is changed?

    help would be appreciated.
     
  2. Guiyon macrumors 6502a

    Joined:
    Mar 19, 2008
    Location:
    North Shore, MA
  3. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #3
    Look at these:

    NSSearchPathForDirectoriesInDomains()

    NSPathUtilities.h

    NSBundle pathForResource:
     
  4. SmartiOS thread starter macrumors newbie

    Joined:
    Jul 13, 2012
    #4
    will that really work? i have heard the sandbox is protect apps from attacking from another app. so i don't think this will help.:(
     
  5. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #5
    Yes, those'll work. They can access files within your app's sandbox.
     
  6. SmartiOS thread starter macrumors newbie

    Joined:
    Jul 13, 2012
    #6
    i don't mean the sandbox of my app, i mean can i copy file from my app root to another app sandbox? hope it's clear now.
     
  7. Guiyon macrumors 6502a

    Joined:
    Mar 19, 2008
    Location:
    North Shore, MA
    #7
    No. You'll never be able to do that unless you've jailbroken your device; it defeats the entire purpose of the sandbox.
     
  8. SmartiOS thread starter macrumors newbie

    Joined:
    Jul 13, 2012
    #8
    Yes it's on jailbroken device, and i have copied that file from root to another sandbox documents successfully. but what about if sandbox changed and as long as i'm on jailbroken device? thank you.
     
  9. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #9
    Most of the developers in this forum don't deal with jailbreak programming, so you'll probably have better luck getting answers by seeking out a jailbreaking programming forum elsewhere. Sorry.
     

Share This Page