Best Folder to store Apps Database

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
hrcap
Posts: 141
Joined: Mon Jan 14, 2019 5:20 pm

Best Folder to store Apps Database

Post by hrcap »

Evening All

I hope that you are all well and safe.

I have an app which works on both desktop and mobile.

When on mobile the app currently builds its SQLite database in the following location

specialfolderpath (cache) & "/Applications/app_name/Data/Databases/app_name.sqlite"

This has worked fine up until recently... but now that my phones memory is coming close to full the phone is purging the cache folder every so often and as such my apps DB gets deleted.

I'm going to change the location that the DB is stored in but before I do I thought I would ask for advice here to ensure I get the folder location correct, so which of the special folder path folders should I store the DB in?

- home
- documents
- library
- temporary
- engine
- resources


Many Thanks
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Best Folder to store Apps Database

Post by Klaus »

It is definitvely -> specialfolderpath("documents")
hrcap
Posts: 141
Joined: Mon Jan 14, 2019 5:20 pm

Re: Best Folder to store Apps Database

Post by hrcap »

Thank you very much Klaus

Saves me making another beginners error that remains undiscovered until a later date.


Many Thanks and enjoy the sunshine
Post Reply