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: 131
Joined: Mon Jan 14, 2019 5:20 pm

Best Folder to store Apps Database

Post by hrcap » Sat Apr 04, 2020 10:42 pm

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: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Best Folder to store Apps Database

Post by Klaus » Sun Apr 05, 2020 1:31 pm

It is definitvely -> specialfolderpath("documents")

hrcap
Posts: 131
Joined: Mon Jan 14, 2019 5:20 pm

Re: Best Folder to store Apps Database

Post by hrcap » Sun Apr 05, 2020 2:17 pm

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

Return to “iOS Deployment”