Reading and Writing CSV Files and their persistence ...
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Reading and Writing CSV Files and their persistence ...
14301-how-do-i-read-write-to-files-in-ios
Love the lessons.
Makes everything look so easy.
I'm about to try the lesson above in conjunction with installing a csv file to load buttons with text.
Say 6 buttons on a card.
Read in the csv values from the text file I installed with the app.
Then based up on the selection,
Load six more button text for that specific selection and display the same card with new text etc.
I would also like to save some data from user input and what screen they were on etc.
I'd like to save this data and have the saved data persist even after I update my app or install the app again etc.
Is it possible to do this in iOS?
I'll keep researching until I find it or someone points me in the right direction.
Love the lessons.
Makes everything look so easy.
I'm about to try the lesson above in conjunction with installing a csv file to load buttons with text.
Say 6 buttons on a card.
Read in the csv values from the text file I installed with the app.
Then based up on the selection,
Load six more button text for that specific selection and display the same card with new text etc.
I would also like to save some data from user input and what screen they were on etc.
I'd like to save this data and have the saved data persist even after I update my app or install the app again etc.
Is it possible to do this in iOS?
I'll keep researching until I find it or someone points me in the right direction.
Thanks to RunRev.
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Re: Reading and Writing CSV Files and their persistence ...
...
If they are only temporary files that are used during the execution of the application, then use the "temporary" path.
If the files are to remain accessible for each launch of the application, then use the "documents" path. This is where application specific information is stored that is also backed up by iTunes.
...
you can create folders within the documents folder. Have a look at the dictionary entry for: "create folder"
Thanks to RunRev.
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Re: Reading and Writing CSV Files and their persistence ...
Hi LC4iOS,
The rest you can do.
Simon
Update Yes, Install No. That is an install after deleting the app. Once the app is deleted the documents folder is also deleted.I'd like to save this data and have the saved data persist even after I update my app or install the app again etc.
The rest you can do.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Reading and Writing CSV Files and their persistence ...
OK, so even on my own iPhone 5 that I own, I can't have a folder with a database on it that maybe multiple apps that come and go can access?
Just a follow up question.
If I just add another button to the Hello World app, build it, then install on my iOS device using Keychain Access by dragging an dropping on Applications under my device, its this considered an update or a new install.
Already found.
Just a follow up question.
If I just add another button to the Hello World app, build it, then install on my iOS device using Keychain Access by dragging an dropping on Applications under my device, its this considered an update or a new install.
Already found.
...
In the iOS Standalone Application Settings you can set the Internal App ID, by default this is com.yourcompany.yourapp.
This is what iOS uses to identify the app, if there is an app on the device with the same identifier as the app you are adding it will assume it is an update and overwrite the app on the device. You just need to make this ID different for each of your apps.
Thanks to RunRev.
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Re: Reading and Writing CSV Files and their persistence ...
Not with Apples sandboxing. Now I have recently seen a shell method but that was OSx.I can't have a folder with a database on it that maybe multiple apps that come and go can access?
I think the idea is if you need it, then use iCloud or other online service.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Reading and Writing CSV Files and their persistence ...
Ah, yes of course.
A Client/Server solution.
Just a shame to waste all the room on 64gig iPhone 5.
Thanks for the replies.
A Client/Server solution.
Just a shame to waste all the room on 64gig iPhone 5.
Thanks for the replies.
Thanks to RunRev.
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Re: Reading and Writing CSV Files and their persistence ...
Just to be clear.
You can create your data file of any size (< what is available), you just cannot have multiple apps using that same data.
Simon
You can create your data file of any size (< what is available), you just cannot have multiple apps using that same data.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Reading and Writing CSV Files and their persistence ...
Understood.
Many Thanks.
Many Thanks.
Thanks to RunRev.
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
-
- VIP Livecode Opensource Backer
- Posts: 10044
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Reading and Writing CSV Files and their persistence ...
Search Google fire"CSV must die". 
Unless you need to support CSV because some other program you're working with offers no alternative, there are many better formats worth considering, even the humble yet efficient LiveCode stack file.

Unless you need to support CSV because some other program you're working with offers no alternative, there are many better formats worth considering, even the humble yet efficient LiveCode stack file.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Reading and Writing CSV Files and their persistence ...
Hi Richard,
Thanks for NOT suggesting XML.
I was just trying to keep it simple and easy to read n write etc.
But it looks like LiveCode lessons and samples makes it easy to do all.
Thanks for NOT suggesting XML.
I was just trying to keep it simple and easy to read n write etc.
But it looks like LiveCode lessons and samples makes it easy to do all.
Thanks to RunRev.
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
-
- VIP Livecode Opensource Backer
- Posts: 10044
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Reading and Writing CSV Files and their persistence ...
If you ever see me recommending XML for any system where it's not absolutely required, that'll be your clue that the pod people have replaced me, and you can safely ignore anything that imposter writes.LC4iOS wrote:Thanks for NOT suggesting XML.

Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Reading and Writing CSV Files and their persistence ...
LOL. Will do.
I've moved on to LiveCode SQLite samples.
If You can read and copy n paste its embarrassing how easy it is.
I've caught myself a number of times trying to do it my way.
Finding out its much easier to follow the samples and do it the LiveCode way.
I've moved on to LiveCode SQLite samples.
If You can read and copy n paste its embarrassing how easy it is.
I've caught myself a number of times trying to do it my way.
Finding out its much easier to follow the samples and do it the LiveCode way.
Thanks to RunRev.
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member
Thanks to LiveCode forum members.
LiveCode v5.5.5 - iOS Android Mac Windows - 6.5 Community
27" 2012 iMac i5, MacBook Pro, MacBook Air, iPhone 5, iPhone 4
xCode 5.0.2 - iOS7 - OS X Mavericks
Paid Apple iOS Developer Program Member