- Home /
 
               Question by 
               wraxul · Dec 17, 2013 at 12:28 AM · 
                iosstreamingassetsio  
              
 
              iOS Streaming Assets inaccessible
I'm trying to read a number of files within a folder structure under StreamingAssets. This works fine in the editor, and the files are copied to the Raw folder with my xcode project. However, when I run on the device, I get "Access to "/var/mobile/Applications/xxxxxxxx/dev.app/Data/Raw/MyData/SubDir1/Foo.bin" is denied." Not sure what's wrong.
  mainDirectory = Application.dataPath + "/Raw/MyData/";
     
  string[] directories = Directory.GetDirectories(mainDirectory + "SubDir1");
     
  foreach (string dir in directories)
  {
     string[] files = Directory.GetFiles(dir, "*.bin");
     for (int i = 0; i < files.Length; ++i)
     {
         DoSomethingWithFile(files[i]);
     }
  }
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                