Data storage on an iPad

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Ron Zellner
Posts: 106
Joined: Wed May 31, 2006 9:56 pm
Location: College Station, Texas
Contact:

Data storage on an iPad

Post by Ron Zellner » Thu Dec 02, 2010 3:26 pm

I'm working on educational apps where I want to record the actions of the students: what they did & when they did it (time & date), choices made, quizzes, opinion gathering, etc.

I'd like to have the data submit to an SQL data base if they are online or store the data if they are not.

Do we know how the rules of regular LiveCode data storage/submission, fields, variables, etc. apply to the mobile apps?

Can the text entered into a field be retained and appear the next time the app is opened?

Related to RJ Cooper's recent questions, do the LiveCode audio recording components work and store files?

Thanks.

Ron

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Data storage on an iPad

Post by Klaus » Thu Dec 02, 2010 5:06 pm

Hi Ron,

please check the PDF that came with your iOS plugin for "File and Folder Handling"!
You need to save your data in these folders and retrieve them when the app starts.

Please check my latest Rev newsletter article to get an idea how to do this:
http://runrev.com/newsletter/october/is ... etter3.php

Sound recording is not (yet?) supported in Livecode mobile I'm afraid.


Best

Klaus

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Data storage on an iPad

Post by Klaus » Thu Dec 02, 2010 6:44 pm

Hi Ron,

I just saw that there are new iOS tutorials on the Rev website, which handle exactly what you need!
Check this:
http://www.runrev.com/products/mobile-d ... tutorials/


Best

Klaus

edelen
Posts: 2
Joined: Fri Oct 22, 2010 11:14 pm

Re: Data storage on an iPad

Post by edelen » Thu Dec 09, 2010 8:59 pm

Hi Klaus,

I tried to make a simple app for iPad to post data to sql database but it didn't work. It worked on my mac but it didn't work on iPad. I did stand alone settings properly. Do you have any suggestion?

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Data storage on an iPad

Post by Klaus » Fri Dec 10, 2010 12:00 pm

Hi edelen,

externals, and SQLite access is only possible with an external, are not yet supported on iDevices.
So you need to create another solution.

Check my posting on "databases on iPhone" in this forum, maybe that is useful for you.


Best

Klaus

sylvanr
Posts: 80
Joined: Wed Nov 24, 2010 10:38 am

Re: Data storage on an iPad

Post by sylvanr » Tue Dec 14, 2010 7:50 pm

While waiting for a response to my question in the "database on iphone" subject in this same forum, I thought I would look at some of the other questions and saw this one which seems similar to the problem I have been having except on the iPad instead of the iPhone. My interest is not so much about saving to an sql database but is about being able to save data. Eventually, I had hoped to be able to do interactive databases on the iPad, too, so any answers here are of interest to me as well.

I see that some of the same suggestions have been made here as had been made to me for saving a few preferences or very small amounts of data from a few fields or buttons from one record but no answer here, either, for saving entire NEW records added to a database or modified data from multiple cards? It seems like the "sub-stack" or "splash-screen" solutions should be the answer for saving larger amounts of data and new records but I haven't seen those solutions actually work in the iPhone simulator. Please post if you are able to find a solution on the iPad for adding records to a database and modifying multiple fields and buttons on multiple cards/records, as maybe the same solution will work on the iPhone too?? I will check back! :-)

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: Data storage on an iPad

Post by malte » Wed Dec 15, 2010 8:51 pm

This appears to work (at least in the simulator)

on mouseUp
local thePostfix
put the seconds into thePostFix
create inv stack ("test"&thePostFix)
-- put your data into custom properties or fields or whatever
save stack ("test"&thePostFix) as specialFolderPath("engine")&"/test"&thePostFix
set the directory to specialFolderPath("engine")
answer the files
end mouseUp

Hth,

Malte

Post Reply

Return to “iOS Deployment”