Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone - Copy sqlite file from phone for use in simulator

I'm working on an app that uses Core Data, and in the course of development have created a great set of test fixtures on the actual test device.

I'd like to pull that sqlite file off of the phone and be able to use it in the simulator.

My app delegate specifies the sqlite file's location as:

NSURL *storeUrl = [NSURL fileURLWithPath: [[self applicationDocumentsDirectory] stringByAppendingPathComponent: @"Quadriped.sqlite"]];

What is the easiest way to do this?

like image 686
Bill Shiff Avatar asked Dec 31 '10 00:12

Bill Shiff


1 Answers

You can go into the Organizer window in Xcode and spelunk into the file system of your device. Here is a blog post I just did not too long ago that describes this:

http://www.dosomethinghere.com/2010/12/13/moving-a-sqlite-database-from-device-to-simulator/

like image 117
BP. Avatar answered Oct 02 '22 14:10

BP.