【问题标题】:iPhone - Copy sqlite file from phone for use in simulatoriPhone - 从手机复制 sqlite 文件以在模拟器中使用
【发布时间】:2010-12-31 00:54:33
【问题描述】:

我正在开发一个使用 Core Data 的应用程序,并在开发过程中在实际测试设备上创建了一组很棒的测试装置。

我想将那个 sqlite 文件从手机中提取出来,并能够在模拟器中使用它。

我的应用委托将 sqlite 文件的位置指定为:

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

最简单的方法是什么?

【问题讨论】:

    标签: iphone cocoa-touch core-data


    【解决方案1】:

    您可以进入 Xcode 中的 Organizer 窗口并深入了解您设备的文件系统。这是我不久前写的一篇博客文章,描述了这一点:

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

    【讨论】:

      猜你喜欢
      • 2018-05-10
      • 2011-06-06
      • 2012-02-18
      • 1970-01-01
      • 2023-03-06
      • 2011-07-31
      • 1970-01-01
      • 2013-12-24
      • 2021-03-03
      相关资源
      最近更新 更多