location of database for ios

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
fko
Posts: 61
Joined: Tue May 20, 2014 2:13 pm

location of database for ios

Post by fko » Sun Oct 26, 2014 2:57 pm

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

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: location of database for ios

Post by Klaus » Sun Oct 26, 2014 3:23 pm

Hi fko,

check this for a more info about this topic and a ready made script for this :D
http://forums.livecode.com/viewtopic.php?f=53&t=7669

Best

Klaus

fko
Posts: 61
Joined: Tue May 20, 2014 2:13 pm

Re: location of database for ios

Post by fko » Mon Oct 27, 2014 3:27 pm

Hi Klaus,

Thanks for the link...:-)

I will read it this evening and see if it is my problem.

regards,
fko

fko
Posts: 61
Joined: Tue May 20, 2014 2:13 pm

Re: location of database for ios

Post by fko » Tue Oct 28, 2014 11:30 am

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

fko
Posts: 61
Joined: Tue May 20, 2014 2:13 pm

Re: location of database for ios

Post by fko » Wed Oct 29, 2014 3:22 pm

Please, any help for my questions of my last post??????

Thanks in advance! :-)
fko

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: location of database for ios

Post by Klaus » Wed Oct 29, 2014 3:51 pm

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! 8)

Sorry, no idea aboout updates...


Best

Klaus

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7390
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: location of database for ios

Post by jacque » Wed Oct 29, 2014 5:07 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

fko
Posts: 61
Joined: Tue May 20, 2014 2:13 pm

Re: location of database for ios

Post by fko » Thu Oct 30, 2014 11:13 am

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

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7390
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: location of database for ios

Post by jacque » Thu Oct 30, 2014 4:09 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

fko
Posts: 61
Joined: Tue May 20, 2014 2:13 pm

Re: location of database for ios

Post by fko » Thu Oct 30, 2014 4:27 pm

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...:-)

Post Reply