开发者

iPhone - Copy sqlite file from phone for use in simulator

开发者 https://www.devze.com 2023-02-02 01:43 出处:网络
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'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 ap开发者_如何学运维p 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?


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/

0

精彩评论

暂无评论...
验证码 换一张
取 消