【发布时间】:2015-04-13 06:37:43
【问题描述】:
我需要为我的 CoreData 获取数据库存储名称,并且只是想知道该名称是否与 Xcode 项目名称有关。
【问题讨论】:
-
随便你设置,检查代码...
我需要为我的 CoreData 获取数据库存储名称,并且只是想知道该名称是否与 Xcode 项目名称有关。
【问题讨论】:
检查 AppDelegate。它将在创建数据库存储的代码中。
NSURL *applicationDocumentsDirectory = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
NSURL *storeURL = [applicationDocumentsDirectory URLByAppendingPathComponent:@"whateveryouwant.sqlite"];
【讨论】: