错误信息:
2012-07-24 10:35:19.449 appname[5892:16f0b] Unable to load persistent store at URL 'file://localhost/Users/username/Library/Application%20Support/iPhone%20Simulator/5.1/Library/Keyboard/UserDictionary.sqlite' ({
metadata = {NSPersistenceFrameworkVersion = 407;
NSStoreModelVersionHashes = {
UserDictionaryEntry = <f0c9025b 602122f9 37a4e274 bdaacec1 b9a66f83 fca5c43b bed5e80a 6baee338>;
};
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers = (
""
);
NSStoreType = SQLite;
NSStoreUUID = "82DA18BC-0E80-412F-BDC4-77BA04FFDAF9";
"_NSAutoVacuumLevel" = 2;
};
reason = "The model used to open the store is incompatible with the one used to create the store";
})
查看crash thread,显示在nsentitydescription entityforname: inmangageobjectcontent方法上,推断写sqlite数据库错误,而后在工程里的所有[[NSUserDefaults standardUserDefaults] synchronize];地方打断点顺利找到原因。