SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict ruba's Avatar
    Join Date
    Apr 2005
    Location
    Amman -Jordan
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question need help in login system on iOS

    Hi all ,

    how can I create a login page in the iOS app, which connect to the online server ?
    and how can I save the loged in information in the mobile and how can I know that they are online (same as cookies on the web)


    thanks
    Open Blocked website
    Open Blocked Website
    Knowledge Is Knowing That A Tomato Is A Fruit,
    Wisdom Is Not Putting It In A Fruit Salad.

  2. #2
    SitePoint Zealot
    Join Date
    Jun 2010
    Location
    Arizona
    Posts
    109
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you use something like PhoneGap or MoSync Reload, they basically embed the native mobile web browser. From there, you can wrap up a real web page that contains your login screen. Everything about the web browser is implemented (cookies, redirection, Javascript, etc) but you might have to specifically turn on various features (e.g. Javascript in a WebView on Android is disabled by default).

    Personally, I dislike PhoneGap-like apps. They don't have the same feel to them as a native app. Taps don't register immediately as clicks, scrolling is laggy, they look a little "off" in terms of design, hardware buttons don't always work like the user expects them to, and so on. This is the lazy way to develop apps but it does allow you to rapidly develop one application that works on all devices.

    If you want to go fully native, you'll need to make the web requests yourself to login. Save the login information in a configuration object so the user only has to enter in their information one time. Building a RESTful API on your server is a good idea. You make a request to your server through the API from the app and the server returns results in a JSON or XML format. Your app then parses each response and does something with it.

    Google uses tokens, not login credentials for all of their APIs. You first login with OAuth through their login token server and get a set of expiring tokens that can be used with their other apps. Those tokens are then used to do other things.
    Thomas Hruska

    Single Sign-On Server/Client - The PHP login system that rocks.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •