【问题标题】:Is the XCode project name same as the sqlite store for CoreData? [closed]XCode 项目名称是否与 CoreData 的 sqlite 存储相同? [关闭]
【发布时间】:2015-04-13 06:37:43
【问题描述】:

我需要为我的 CoreData 获取数据库存储名称,并且只是想知道该名称是否与 Xcode 项目名称有关。

【问题讨论】:

  • 随便你设置,检查代码...

标签: ios sqlite core-data


【解决方案1】:

检查 AppDelegate。它将在创建数据库存储的代码中。

NSURL *applicationDocumentsDirectory = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
NSURL *storeURL = [applicationDocumentsDirectory URLByAppendingPathComponent:@"whateveryouwant.sqlite"];

【讨论】:

    猜你喜欢
    • 2016-08-23
    • 1970-01-01
    • 2012-07-12
    • 2018-09-02
    • 1970-01-01
    • 2017-10-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多