简体   繁体   中英

How to remove NSDocumentDirectory sqlite database from the iOS app cache?

At user defined intervals, my latest sqlite database is downloaded from my remote server and unzipped in the NSDocumentDirectory. However, the latest data does not get displayed to the user, because an older version of the database is being cached.

I have checked the iPhone Simulator documents directory at:

/Users/cdesign/Library/Application Support/iPhone Simulator/6.1/Applications/B458A3F5-5B21-49CD-B4D8-17E5189678FA/Documents

I can confirm that the latest database has been downloaded and unzipped correctly, using Navicat Sqlite.

My question is, how do I remove an sqlite database from the memory cache in iOS, using objective c?

Thanks in advance

OK. I managed to add another inner join to one of my SQL statements, which effectively removed about 100 records from my results, making me think that I was viewing records from an old database.

There is no caching issue, just one very red faced developer!

Apologies to the community...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM