2015-05-13 25 views
-1

我已創建核心數據,並且希望查看該數據。
我曾經看到這樣的數據路徑:如何在iPhone中查看核心數據表

~/Library/Application Support/iPhone Simulator/User/Applications/ 

但我在此之後再次庫使用:

~/Library/Application Support/iPhone Simulator/User/ 

如何找到sqlitedb?
我正在使用Firefox查看數據。

+0

請參見上面的鏈接,很好地解釋了在覈心數據execution.check中查看原始sql語句以查看此鏈接中的原始sql statemenet部分http://www.appcoda.com/core-data-tutorial-update-delete/ – Mukesh

回答

2

我能夠進入appDelegate.m,向下滾動到

- (NSURL *)applicationDocumentsDirectory 

方法,並NSLogging返回路徑,這樣找到它:

// Returns the URL to the application's Documents directory. 
- (NSURL *)applicationDocumentsDirectory 
{ 
NSLog(@"%@",[[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]); 

return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; 

}