Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application users account registration and login, best way to handle?

First of all, i'm new to Objective-C, so please be patient with me.

I want to add to my application users account management, users can register/log-in into a personal account that will synchronized with database on the internet. I dont have a clue how to do that. I know how to work with sqlite3. I was thinking maybe to create an sqlite3 database on the device. is it possible to store images into sqlite3 database? is it the best and efficient way to manage users on application?

what does sign in with Facebook or Twitter do? is it possible to add them both and another option for someone who doesn't have Facebook or Twitter?

What is the best way to handle account registration and login on iPhone?

Thanks alot!

like image 563
ytpm Avatar asked Mar 10 '12 08:03

ytpm


People also ask

How do you handle user authentication?

The process is fairly simple; users input their credentials on the website's login form. That information is then sent to the authentication server where the information is compared with all the user credentials on file. When a match is found, the system will authenticate users and grant them access to their accounts.

What is user registration and login?

A registered user is a user of a website, program, or other systems who has previously registered. Registered users normally provide some sort of credentials (such as a username or e-mail address, and a password) to the system in order to prove their identity: this is known as logging in.


2 Answers

I want to add to my application users account management, users can register/log-in into a personal account that will synchronized with database on the internet.

AFNetworking or ASIHTTPRequest can help you with this. create a web service api, maybe in php + mysql or any web scripting language you prefer, from the device you can POST your data like username and password and do the logic in your web service.

I was thinking maybe to create an sqlite3 database on the device. is it possible to store images into sqlite3 database?

what is your plan here? why would you create a database on the device? do you want to manage the users locally? if yes, that would be easier and more efficient because you dont need internet connection to create a request to server. and yes its possible to store images in sqlite by storing the image as blob

what does sign in with Facebook or Twitter do? is it possible to add them both and another option for someone who doesn't have Facebook or Twitter?

Yes its possible. you can have three log in options. facebook, twitter, and your custom log in option. if you want to integrate facebook and twitter on your app. there are many tutorial and docs you can find there.
I suggest: this for facebook and download the sample app

What is the best way to handle account registration and login on iPhone?

it depends on your app requirement, if you dont need to store your user data in a database on a cloud server, the best way is to create a local database on device.

like image 160
janusfidel Avatar answered Sep 24 '22 23:09

janusfidel


This is a broad question - so the answer is going to be very general, little of which has to do with Objective-C, iOS, or Mac specifically.

It sounds like you are creating an application on a mobile device that needs to synchronize data with a database for which the mobile app is a client. One way of managing this is to start with table of users and credentials on your server, e.g. in MySQL. Then you need to write the API on the server side, e.g. in PHP, Rails, Python, etc. Then you will write the web service code on the device that interacts with the server's API.

If you are new to developing on iOS, then I would suggest running through some tutorials on consuming web services, first. That is, I would learn how to connect to pre-existing web services first. You might want to check out the AFNetworking library for Mac and iOS. It has some demo applications. But if you want to stick with the native URL loading system on iOS, there are numerous tutorials available. (Here's one)

I should mention another option is to use Amazon Web Services SimpleDB. There is an iOS SDK. It allows you to execute queries directly against the db without writing the server-side code.

You mentioned sqlite3. This will allow you to manage data on the device; but you state that you want to sync data with some resource on the internet. You can store images in sqlite3; but you can save yourself a lot of hassle by looking into Core Data as an alternative.

like image 24
FluffulousChimp Avatar answered Sep 24 '22 23:09

FluffulousChimp