Login swift application

Discussion in 'iOS Programming' started by niledile, Jun 17, 2015.

  1. niledile macrumors newbie

    Joined:
    Jun 17, 2015
    Location:
    Cape Town, South Africa
    #1
    Hi folks,

    I am new to iOS development, and would like some tips on loading a file to check for login details.

    I would like to build an app that checks if the username and password exists, and allows the user to log in if it does.

    I don't know where to start. What file type should I be using to store the login data, and where does the file sit? Do I add it to my current project?

    any advice would be greatly appreciated.

    Thank you
     
  2. mds1256 macrumors regular

    Joined:
    Apr 9, 2011
    #2
    Usually login accounts are held on a server and your app will communicate with the server to check credentials.

    Doesn't have to be that way as the login could be local only but rarely isn't.

    For storing them on a server then you would be best to look into REST webservices and NSURLSession for GET and POST requests, as well as XML or JSON for the responses and how to parse them.

    Have a quick look at PARSE.com as they allow a framework for logging users in etc.
     
  3. mjohnson1212 macrumors member

    Joined:
    Nov 15, 2007
    #3
    If you need to persist the credentials on the device you should store them in the keychain not a file.
     
  4. cudest macrumors newbie

    cudest

    Joined:
    Apr 22, 2015
    Location:
    canada
    #4
    Try to make app communicate with server and if server login is successfully done than you have to further look up for some coding mistakes. you can show your code here so we can suggest right way.
     
  5. niledile thread starter macrumors newbie

    Joined:
    Jun 17, 2015
    Location:
    Cape Town, South Africa
    #5
    Thank you for steering me in the right direction. I've spent some time researching. I am passing an encrypted password to a webservice.
     

Share This Page