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 4260910
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:59:00+00:00 2026-05-21T05:59:00+00:00

so I got my iPhone app to use the keyChain and store my password.

  • 0

so I got my iPhone app to use the keyChain and store my password.

KeychainItemWrapper *kc = [[KeychainItemWrapper alloc] initWithIdentifier:@"Password"];
[kc SetObject:@"My_Password" forKey:(id)kSecAttrAccessGroup];
[kc release];

This saves my password correctly.
I tried to pass a string (username) instead of (id)kSecAttrAccessGroup to relate the password to a specific username, but It crashes.

QUESTION: How can i relate the stored password to a username, because my app allows multipple user to login.

  • 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-21T05:59:01+00:00Added an answer on May 21, 2026 at 5:59 am

    I know it’s not really an answer to your quesiton. But I use SFHFKeychainUtils(Github).

    It’s also a wrapper and it allows you exactly what you are looking for. Store a password associated to a username. Here’s some code how I did it with SFHFKeychainUtils.

    NSString *username = @"Username";
    NSString *password = @"Password";
    [SFHFKeychainUtils storeUsername:username andPassword:password forServiceName:@"Your App" updateExisting:YES error:NULL];
    

    Or pass an pointer to a NSError object if you want any error information. 😉
    I hope my answer will help you…

    Sandro Meier

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

Sidebar

Related Questions

I submitted an iPhone app to the store that got approved, but some things
We've got an android app and an iPhone app (same functionality) that use sqlite
I've got an iPhone App that is supposed to send POST data to my
I can't figure this one out. I've got an iPhone-only app with an image
On an iPhone App, I've got a custom keyboard which works like the standard
I've got RestKit in my iPhone app interacting with a Rails app on Heroku,
I've got rejected my recent update on iPhone app and it says: When file
I'm building an iphone app and I've got a table view with some textfields
I'm writing my first iphone app and through several examples I've got a UITableView
I am going to develop the iPhone app. But I got stuck with one

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.