Page 1 of 1
location of database for ios
Posted: Sun Oct 26, 2014 2:57 pm
by fko
Hi,
It is a long time i didn't enter in the forum.
I had other work to do, so i couldn't advance more with my app...
Around two months ago ( the last time i entered here ) i had my app quite ready and i was ready too to buy the license of LC.
So now i will try to recover all this lost time, resolving my last doubts and then buying the license to can send my app to the app store...
As a desktop application, my app is working but i am not sure it will work as one app in ios.
I was reading in the forum and in the lessons too about the location of the database and i have doubts.
Where should I put the database? and then how it should work for one update of my app? Because, it is evident, that i want to keep the data stored in the database and don't put an empty one.
Thanks in advance...
Regards,
fko
Re: location of database for ios
Posted: Sun Oct 26, 2014 3:23 pm
by Klaus
Hi fko,
check this for a more info about this topic and a ready made script for this
http://forums.livecode.com/viewtopic.php?f=53&t=7669
Best
Klaus
Re: location of database for ios
Posted: Mon Oct 27, 2014 3:27 pm
by fko
Hi Klaus,
Thanks for the link...
I will read it this evening and see if it is my problem.
regards,
fko
Re: location of database for ios
Posted: Tue Oct 28, 2014 11:30 am
by fko
Hi,
I already read the link gave me Klaus and the apple guideliness again.
and if i understood well, i should make this:
put my database in the folder "TheNameOfMyApp/Documents", because in this folder i should put the documents or data generated by the user.
And if this is correct, then my next doubt are concerning the updates. How it works the update?
It is me who has to create one standalone for 'install', one standalone for 'uninstall' and one standalone for 'update' and bring them to apple to put in the app store?
And if it is like this, is when i have to control to save the ancien user database before to execute the update. Am i wrong?
and to make this control is when i can use what 'Interactbooks' or 'Andy P' said in the suggested link.
Sorry if my questions seem very 'stupi...', but it is my first time to try to upload one app to the app store and following their guideliness. I'am a newbie for these kind of things...
Thanks in advance.
Regards,
fko
Re: location of database for ios
Posted: Wed Oct 29, 2014 3:22 pm
by fko
Please, any help for my questions of my last post??????
Thanks in advance!

fko
Re: location of database for ios
Posted: Wed Oct 29, 2014 3:51 pm
by Klaus
Hi fko,
fko wrote:put my database in the folder "TheNameOfMyApp/Documents", because in this folder i should put the documents or data generated by the user.
simply because this is the only (?) folder on iOS and Android where your app has WRITE permission!
specialfolderpath("engine") = TABOO!
Sorry, no idea aboout updates...
Best
Klaus
Re: location of database for ios
Posted: Wed Oct 29, 2014 5:07 pm
by jacque
You don't need to do anything about updates. Apple manages that automatically. When you want to release an update, just upload the new app to the App Store normally and Apple will do the rest.
Re: location of database for ios
Posted: Thu Oct 30, 2014 11:13 am
by fko
Thanks Klaus and Jacque for your answers...
Jacque, so it means that apple won't overwrite the database ( with data saved by the user ) located in "TheNameOfMyApp/Documents" with the empty one i will have always in my installation standalone?
If it is like this, i think that i will avoid many many headaches...
Regards,
fko
Re: location of database for ios
Posted: Thu Oct 30, 2014 4:09 pm
by jacque
That's right, an update does not remove the user data. If the user uninstalls the app then the data is deleted also. But an update doesn't do that.
Your app should always check for the existence of the database on startup to see if it needs to create it.
Re: location of database for ios
Posted: Thu Oct 30, 2014 4:27 pm
by fko
Thanks Jacque...
Cool if the update won't remove the user data...
And my standalone ( for the moment in the desktop version ) is always including the database ( that is already created but empty ).
So normally it should appear always one database after the install...Or at least is what i hope...
