-2

I have simple login form I am using SQLite database which has fields like Username and password. I want to do simple login through my view. It will check username and appropriate password. How can I do this? I have searched a lot in stack as well as on web.But can't get the proper solution. Help me out.

Ahmad Kayyali
  • 8,233
  • 13
  • 49
  • 83
k.shree
  • 119
  • 1
  • 2
  • 12
  • 2
    Have u tried googling it? there are varieties of sample apps. – Vidya Murthy Feb 27 '12 at 12:47
  • 3
    I doubt you made any search... [An Example SQLite based iOS 4 iPhone Application](http://www.techotopia.com/index.php/An_Example_SQLite_based_iOS_4_iPhone_Application), if you are looking for some code to copy and paste that is not how SOF works. – Ahmad Kayyali Feb 27 '12 at 12:51

4 Answers4

1

As far as i see you need to create a Web Service application. A few point may have to know/serach for:

  1. Create a database for your app and prepare server side for that
  2. Prepare views/fields you will enter the username&password ect
  3. Make proper connection between your app and the server
  4. And do some research on yourself:))

Here there are a lot of good tutorials almost about any kind of application development.

il-os
  • 203
  • 3
  • 10
0

For the first time when user logs in using his username and password store the values in the database.

Now, from the next time, whenever user fills in his login credentials and taps on login button, retrieve the username and password field values from the database and compare them with the values filled in by the user. If there is match between values, show the view other show some alert.

Manish Verma
  • 41
  • 1
  • 5
0

If you have few number of username then store username & passowrd in the database. When user enters the username with the password check that related password in the database.

if it return true,then allow user to login.

This is simple way to implement login funcnality.

Rupesh
  • 2,061
  • 5
  • 22
  • 36
0

You can use keychain to store and retrieve user/password pairs. Here is a similar question answered - iOS: How to store username/password within an app?.

Community
  • 1
  • 1
hburde
  • 1,441
  • 11
  • 6