FI can save and load Dictionary data within the simulator but when I run it on my iPhone it doesn’t seem to work. I cant quite tell what is happening. Here is how I save and load data:
Loading
NSString *homeDir = NSHomeDirectory();
NSDictionary *wholeDictionary = [NSDictionary dictionaryWithContentsOfFile:[NSString stringWithFormat:@"%@userdata.dat",homeDir]];
Saving
NSString *homeDir = NSHomeDirectory();
[dict writeToFile:[NSString stringWithFormat:@"%@userdata.dat",homeDir] atomically:YES];
NSHomeDirectoryreturns the application directory, which is not writeable. You need to write your data to the application’s documents directory: