views:

246

answers:

2

Hi guys,

I'm trying to make a login system for my cocoa app. How would I do this? I know it involves SQL, but I know nothing of SQL. I want the user to register or login. It would be easier if apple had a source code for this kind of thing, but I don't think they do.

Best Regards,

Kevin

+1  A: 

Implement the login system on the server. Then all you have to worry about in your app is:

  1. send them to your website via URL to sign up
  2. query for a name and password
  3. if name and/or password is incorrect more than three times, go to 1
  4. user is logged in. Do something.
mahboudz
+1  A: 

You can also use the keychain on the iPhone to securely store and retrieve passwords. Here's excellent code from Sci-Fi Hi-Fi. You prompt for a password, store it securely in the keychain for later comparison. Pretty simple. Documentation on the site.

Jordan