I made a Core Data application, and I want to save the file.sqlite to a different directory from the default. I came across this SO thread, then posted this SO question, and the project appears to be compling, but my the file.sqlite is not getting saved in the location I specified. I created a method, and added some code to the AppDelegate.m file, but the storeURL variable is still saving the file.sqlite in the default "Documents directory. How do I call the method I created within the AppDelegate.m file to specify the proper location for the storeURL variable?
Should I just change,
NSURL *storeURL = [NSURL fileURLWithPath: [docPath stringByAppendingPathComponent:@"Accounts.sqlite"]];
to
NSURL *storeURL = [NSURL fileURLWithPath: [documentsDirectoryPath stringByAppendingPathComponent:@"Accounts.sqlite"]];
Also will this break iOS Simulator support?