6

Whenever I restart my application it's folder name in finder is changed from

09323D3F-D371-4556-ABA3-BD23AF487F12

to

E771BBEC-ACC6-489C-B7C1-B5FF11004CB2/

NSHomeDirectory() is changing everytime I run the app in simulator.

Alex Cio
  • 6,014
  • 5
  • 44
  • 74
abh
  • 1,189
  • 2
  • 14
  • 30
  • see http://stackoverflow.com/questions/25233386/xcode-6-keeps-renaming-my-apps-directory-in-ios8-simulator-after-each-run – danh Mar 09 '15 at 15:13

3 Answers3

11

Don't save the full path, but just the directory and file name to the images. Since this behaviour is new in iOS 8 and will happen on a real device.

rckoenes
  • 69,092
  • 8
  • 134
  • 166
0

i think you have this link in your code NSDocumentationDirectory change it into NSDocumentDirectory

NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
Jay Bhalani
  • 4,142
  • 8
  • 37
  • 50
0

save your file path like as follows :

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);

NSString *documentsDirectory = [paths objectAtIndex:0];

NSString *localFilePath = [documentsDirectory stringByAppendingPathComponent:[[yourArray objectAtIndex:indexPath.section]lastPathComponent]];
Jay Bhalani
  • 4,142
  • 8
  • 37
  • 50