Search Unity

Possible to view StreamingAssets folder on iOS?

Discussion in 'iOS and tvOS' started by eco_bach, Mar 19, 2017.

  1. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    For simplicity sake I've decided to put my config file in the StreamingAssets folder.
    But I will need to be able to manually edit this file on the iOS device with some type of test editor file explorer.

    Can any iOS devs tell me if this is possible?
     
  2. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,305
    only your application has access to the folder
    write yourself some imGUI interface for the file
     
  3. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    ok thanks, so persistentDataPath would be a publicly accessible folder on iOS?
     
  4. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,305
  5. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,305
    you can access Documents folder via iTunes File Sharing, too. I believe StreamingAssets are accessible this way ( but haven't tried it for some time )
     
  6. r-pedra

    r-pedra

    Joined:
    Dec 4, 2015
    Posts:
    104
    You can access this folder through xCode.
    Select Window->Devices.
    Then select your devices. You should see your developed apps. Select your app, and click on the wheel. Download your container, edit your file by browsing the container content (StreaminAssets should be located in a "Documents" folder inside the package), then select Replace Container.
     
  7. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,601
    Wow, so convoluted compared to Android. So no way to edit a config file on the actual device?
     
  8. andymads

    andymads

    Joined:
    Jun 16, 2011
    Posts:
    1,614
    StreamingAssets is not located in a Documents folder.

    Look at the paths returned by Application.persistentDataPath and Application.streamingAssetsPath, they're totally different. Application.persistentDataPath points to the Documents folder that you can read/write from/to. I'm not sure you can write to StreamingAssets.

    Read about StreamingAssets in the manual here.
     
  9. dmelamed

    dmelamed

    Joined:
    Jul 2, 2013
    Posts:
    4
    Thanks.
    So I've installed a open source text editor on iOS, but it can only access and edits files in the public Documents folder. Fine.

    How can we load from this public folder location in unity?? Application.persistentDataPath points to the applications private Documents folder

    Code (csharp):
    1. /var/mobile/Container/Data/Application/<insert long random name>/Documents
     
    yty likes this.
  10. Joits

    Joits

    Joined:
    Jul 12, 2016
    Posts:
    29
    Did you find a solution to this problem?