As far as I know (and read everywhere) an application's documents directory should be somewhere in /var/mobile/Library/
on the iPhone but if I'm logging the gotten directory it is /var/mobile/Documents
.
I get the directory as follows:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
is this a problem if I'm creating a file named Settings.xml
in here or is something wrong with my app/etc.?
Information: I've a jailbroken iPhone 4 with iOS 4.2.1 and my app gets installed via Cydia or SSH.
Update
Yeah, but that directory is not really related to my application. For example I am creating a document settings.xml and what if another application uses the same NSDocumentDirectory and the same file name? And yes, I know. Cydia apps got installed into /Applications but there should be a document directory for my app too and not even /var/mobile/Documents. If you take a look at http://thebigboss.org/hosting-repository/submit-your-app/compile-for-cydia-submission the directory should be /var/mobile/Library/ but as I described before, I never get this directory.
/var/mobile/Library
directory. I have one on my iPhone 3GS running iOS 5.1.1 I did jailbreak with Absinthe. – Moynahan