-1

I'm trying to back up the save file of a video game. I'm pretty sure the save data is stored in /Documents because the folder's "last updated" time stamp changes every time I complete a level. Yet when I open /Documents using iExplorer, iFunBox, et al, it's empty. When I try to copy the entire folder to my desktop computer, it shows up as an empty folder.

I think some setting is preventing me from viewing the internals of that folder. How can I get around this without jailbreaking my phone? Thanks.

I'm using an iPhone 4 (2010) with iOS 7, if it matters.

I'm not an app developer and I have no knowledge of Objective-C. I'm just trying to backup save data for a video game I'm playing. For example, Candy Crush Saga stores save files in Apps/Candy Crush/Documents/Save_########.dat. Other apps also store save files in their respective /Documents folders but I'm not seeing anything inside of them.

Markus E
  • 27
  • 1
  • 4
  • Have you tried to check from XCode Windows Menu -> Devices -> Select Device -> Select your app -> Select "Show container" ? It will show you all sandboxed files related to your app. – Sarju Jul 26 '15 at 06:02
  • I do not understand why somebody downvoted your question. Depends how you saved your settings. The Documents folder contains files you created (including SQLite related files). NSUserDefaults settings are located at /Bundle/Library/Preferences/bundelid.plist so it is normal to have an empty Document folder. – Teddy Jul 26 '15 at 06:58
  • I'm not an app developer and I have no knowledge of Objective-C. I'm just trying to backup save data for a video game I'm playing. For example, Candy Crush Saga stores save files in Apps/Candy Crush/Documents/Save_########.dat. Other apps also store save files in their respective /Documents folders but I'm not seeing anything inside of them. – Markus E Jul 26 '15 at 07:13
  • you should mention in question itself that you are not an ios developer :-) – Sarju Jul 26 '15 at 07:31

1 Answers1

0

The question is lacking any code but it seems that you are not accessing an allowable directory.

iOS apps are restricted in file system access as a security measure. The directory you most likely should use is the NSDocumentDirectory accessed via an API.

Example access code:

Objective-C:

NSString *path = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject];

Swift:

let path = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true).first as! String
zaph
  • 111,848
  • 21
  • 189
  • 228
  • I'm not an app developer and I have no knowledge of Objective-C. I'm just trying to backup save data for a video game I'm playing. For example, Candy Crush Saga stores save files in Apps/Candy Crush/Documents/Save_########.dat. Other apps also store save files in their respective /Documents folders but I'm not seeing anything inside of them. – Markus E Jul 26 '15 at 07:14
  • swift 3 - How to get path upto 'Documents/Inbox/', because access file from 'inbox' directory. – Deepak Tagadiya Sep 07 '17 at 05:38