Los usuarios de la aplicación registran e inician sesión, ¿la mejor manera de manejar?

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?

¡Muchas gracias!

preguntado el 10 de marzo de 12 a las 08:03

2 Respuestas

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 ASIHTTPSolicitud 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.
Yo sugiero: this for facebook y descargar el aplicación de muestra

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.

Respondido 20 Jul 13, 14:07

Thank you very much. it helped me alot! - ytpm

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 uno)

I should mention another option is to use Amazon Web Services SimpleDB. There is an SDK de iOS. 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.

respondido 10 mar '12, 11:03

Thank you very much. it helped me alot! - ytpm

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.