Storing User Data iOS - iphone

i'm developing an iPhone app for the first time. I know that username and password commonly stored in KeyChain. How about data like FirstName, ProfilePictureUrl, I got the data from a rest api. Since those data (firstname...) barely changed, i'm thinking to store it somewhere locally. SHould I use KeyChain as well? or SQLLite? XML?
thanks

you can use sqlite to store them in a local database. or NSUserDefault if you are not expecting massive data.

the simplest solution would be to store them in a .plist file
an example tutorial can be found here: http://ipgames.wordpress.com/tutorials/writeread-data-to-plist-file/

Related

Modify SQLite backing store in core data managed ios app that's live

I need help figuring out how I can correct mistakes in my SQLite database that's managed by core data. I want to change the data in 1 table but im not sure how to accomplish this. The app is live and users store information in a separate table so I can't delete it. Any suggestions?
Thanks!

Is there a a way to migrate data from Core Data to Online Database?

My app currently uses core data. I created a new version of the app that is all cloud based and the database is online. Therefore this requires user registration/accounts to access the data. The easiest thing is for me to make it a separate app, but then I lose the user base I already have.
Is there a way for me to transfer data from the iPhone's core data database to the online database? I am using https://www.parse.com/
Have a look into this github project,
https://github.com/itsniper/FTASync
Sure. To transfer data from CoreData to Parse, just create a PFObject for each row in your CoreData table, and save them to Parse. You can use saveAll to be faster. Then, you don't need the local copy in CoreData any more, so you can remove it.

how to store JSON Parse data in Iphone Locally?

I want to store JSON parse data(companyName and companyID) in Iphone locally. I also can add or delete JSON parse data(companyName and companyID) in store data.
It depends on the amount of data you wanna store. If it's gonna be less then 1000 I would recommend you to store it as plist, otherwise you can use core data or SQLite.
I'm sure this article will help you out... it's for Flickr but shows how to play with JSON :)
http://iosdevelopertips.com/networking/iphone-json-flickr-tutorial-part-1.html
you can try to use NSUserDefaults if it´s just about a single company, not a collection
https://developer.apple.com/documentation/foundation/userdefaults
if not SQLite would be the best solution

iPhone cookies to store username and password

I have no idea how to store username and password details so that the user does not have to login everytime for the iPhone app.
Can anyone lead me in the right direction? I can't seem to find what to do.
Thanks!
You should be using the Keychain API. It will encrypt the data (not hash, as if you have to send it a the server, then the hash wouldn't be any use).
It's a bit of a pain, so take a look at some of sample code and 3rd-party wrappers available on the internet.
You can use Core Data or SQLite or any other storage (XML, JSON), since there are no cookies in iPhone.
Core Data
http://developer.apple.com/iphone/library/documentation/DataManagement/Conceptual/iPhoneCoreData01/Introduction/Introduction.html
SQLite
http://dblog.com.au/iphone-development-tutorials/iphone-sdk-tutorial-reading-data-from-a-sqlite-database/
Also remember to hash the password you should use MD5 at least.

How to use local dictionary to my app?

In My application, how should i find meaning of the word, it should work both online and offline? Please help me out also is there any possiblilite to take local dictionary from iphone?
Sri
As far as I am currently aware, you aren't able to query the iPhone's built in dictionary.
Even if you could, I am not sure that it contains any definitions. Rather it looks for spelling correction on "close" words.
If you are wanting to replicate storing a dictionary inside your app, like the many dictionary apps currently out there, you would have to store the data in your iPhone app somehow.
Wikitionary provides free "dumps" of it's data which you could grab, and put into a form that would be usable in your app.
You would need to store the data in some form of plist, an SQLite database or CoreData.
For taking data from the internet, you would need to look at transferring the data using JSON, XML or PLIST.