One day, I want to backup my Sqlite database created inside the Simulator to my MacBook data directory and I was wondering if this is possible. Yes, it is possible. The files that was created in Simulator is physically located in your MacBook.
You can find the physical directory with the codes below:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);NSString *documentsDirectory = [paths objectAtIndex:0];
Sample output:
/Users/{your Macbook user name}/Library/Application Support/iPhone Simulator/7.1/Applications/{random number}/Documents
No comments:
Post a Comment