Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mikezang

macrumors 6502a
Original poster
May 22, 2010
861
9
Tokyo, Japan
I made app and use plist to save data, but I can"t find it. I defined it as below:
Code:
#define kFilename	@"trade.plist"

and use it like this:
Code:
-(NSString *) dataFilePath {
	NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
	NSString *documentsDirectory = [paths objectAtIndex:0];
	return [documentsDirectory stringByAppendingPathComponent:kFilename];
}
...
[array writeToFile:[self dataFilePath] atomically:YES];

But it is very strange because I couldn't find that plist file, even in ~home/Library/Application Support/iPhone Simulator/, where can I find it?
 

mikezang

macrumors 6502a
Original poster
May 22, 2010
861
9
Tokyo, Japan
Thanks for your suggestion.

I got it, but the problem is that I just create that project, so that I thought that plist file should in the newest app folder, but I can't find, then I log path and I got it, it is not in the newest app folder, but in a older app folder!

I am not sure about this, why the newest project's app folder is not the newest?
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
I've seen that too. I have no explanation. I see multiple app folders get created for one app. Sometimes one is used and sometimes another one is used. Kind of annoying when user data disappears. Having the folders open in the Finder may affect this.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.