I have an iOS app that uses core data. I entered data into it two days ago, and everything was worlking fine then. I closd the app, then re-opened it, and the data was still there as expected. Yesterday, I updated Xcode to 9.4, and when I opened my app, the data was gone. The app prints out the database location, so I went there to look at the SQLite file, which was 25 kB in size. Opening that with DB Browser for SQLite also showed no data. However, when I looked through the folders in the Devices folder (~/Library/Developer/CoreSimulator/Devices), I found another folder that showed it had been updated the day before. When I followed that path to the end, I found another sqlite database that did contain my data. So, it seems that Xcode has "forgotten" where it put my data. I don't know if it's relevant or not, but the new version of Xcode originally open the app with the iPhone 8 simulator, whereas I had been opening it in an iPad simulator in the previous version. Switching back to the iPad simulator did not remedy the situation.
This happened to me once before in March or maybe April. Unfortunately, I don't remember if I did an upgrade of Xcode at that time as well.