Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4087252
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:49:54+00:00 2026-05-20T18:49:54+00:00

I have to make an iPhone application. I have one button and button name

  • 0

I have to make an iPhone application.
I have one button and button name is registration in xib if I click the button then registration form will be open

the registration form is created in web server
if the user fill the registration form
suppose he fill the username and password in registration it will save in server and same username and password should save in or local database also.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:49:55+00:00Added an answer on May 20, 2026 at 6:49 pm

    You have 3 main options for persisting the login data; Settings, Core Data and SqlLite. For just a username and password you only need to use the Settings as the overhead of the other two options would be excessive and they are more often used for relational data.

    To use Settings you need to load them when the application controller initialises by calling;

    + (void) loadDefaultSettings {
    
        NSString *path = [[NSBundle mainBundle] bundlePath];
        NSString *pListPath = [path stringByAppendingPathComponent:@"Settings.bundle/Root.plist"];
        NSDictionary *pList = [NSDictionary dictionaryWithContentsOfFile:pListPath];
    
        NSMutableArray *prefsArray = [pList objectForKey:@"PreferenceSpecifiers"];
        NSMutableDictionary *regDictionary = [NSMutableDictionary dictionary];
    
        for (NSDictionary *dict in prefsArray) {
            NSString *key = [dict objectForKey:@"Key"];
            if (key) {
                id value = [dict objectForKey:@"DefaultValue"];
                [regDictionary setObject:value forKey:key];
            }
        }
    
        [[NSUserDefaults standardUserDefaults] registerDefaults:regDictionary];
    }
    

    You can then store your username and password with a method call to this;

    + (void) storePersistedLogin:(NSString *)uid withPassword:(NSString *)pswd  {
        [[NSUserDefaults standardUserDefaults] setObject:uid forKey:@"UID"];
        [[NSUserDefaults standardUserDefaults] setObject:pswd forKey:@"PSWD"];
    }
    

    You can populate the UITextField inputs using the following method;

    + (void) populatePersistedLogin:(UITextField **)uid andPassword:(UITextField **)pswd {
        [*uid setText:(NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:@"UID"]];
        [*pswd setText:(NSString *)[[NSUserDefaults standardUserDefaults] objectForKey:@"PSWD"]];
    }
    

    I have these public methods in a separate SettingsUtils class so I can make sure my keys are the same. You could also declare the keys as NSString objects instead to reduce the chance of mis-typing them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two targets in my iPhone application: one for my actual app, and
Convert iPad application to iPhone- Universal app. I already have one iPad application, now
I have created an iPhone application which I want to deploy onto an iPhone.
I make iphone application. I use for root controller tab bar controller. One of
I have an existing iPhone application, and I just wanted to make a static
I have a data entry form in a HTML5 application that users will be
In our application we sometimes have to make minor GUI modifications for different customers:
I'm working on an application where users have to make a call and type
I have a simple iPhone application that is very similar to the Page Control
I have a fairly simple iPhone application that I want to have run on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.