-3

I want to start an iPhone app for an E-learning recommendation system which does the following:

  1. Let the user register or log in the app.
  2. After logging in the app ask the user questions.

My question:

What is the best way to manage users to be able to log/register and save/retrieve user questions and answers?

Khorshid
  • 303
  • 4
  • 16

1 Answers1

1

I feel like I've answered this question many times before, but the alleged duplicate recommends using NSUserDefaults and I think that's poor advice for saving the data that your app manages. (The dupe is from back in 2008, BTW; the iOS landscape was somewhat different back then, but even so I still don't think the most popular answer gives very good advice.)

Since you're looking at having your users log in, there may be a server that they're logging into. If so, saving the data on the server is the right thing to do. Exactly how that work will depend on your infrastructure, but you'll probably GET and POST data to a web server using HTTP. There's a LOT of information on the net about how to go about that (lack of research is probably why you're getting down votes), but you'll either use NSURLConnection and NSURLRequest directly, or you'll use a third party library like AFNetworking that makes it even easier to access a web server.

Caleb
  • 124,013
  • 19
  • 183
  • 272
  • Thanks foe answer, I need to save all user data in one server in order to make a kind of analysis on there answers and make recommendation for them. if there is useful links in addtion to your previous answer I'll be happy! – Khorshid Jul 19 '13 at 22:22
  • Caleb, the duplicate was set initially before the question was edited. Originally the question read "What is the best way to save user data in Iphone?". For the asker's question text and initial question title, NSUserDefaults would have worked. Even so, other answers in that thread have satisfactory answers. The asker changed the question text to mention server which essentially changes the entire landscape and scope of the question itself. Now that the scope of the question has changed, it can be voted upon to reopen but even then I'm sure there's an exact duplicate question. – Sid Jul 20 '13 at 01:16