解决方案 »

  1.   

    When you run it on your iPhone you can't access the file directly because the path dataStorePath is on your device.What you can do is that you download the app container via Xcode: First connect your iPhone. Then go to Xcode->Window->Devices in the menu and select your iPhone on the left side. Your app should appear in the "Installed Apps"-list. Select it and click on the settings button (next to the add and delete button) and click on "Download Container...". Xcode will ask you where you want to save it. Afterwards do a right click on the downloaded container in the finder and select "Show Package Contents". Go to AppData->Documents and you will see your sqlite file "NewsData.sqlite".By the way, if you run in the simulator you can open the link directly with the finder.