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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:35:08+00:00 2026-06-06T18:35:08+00:00

I am creating a multi-user iPhone app, and I am trying to finish up

  • 0

I am creating a multi-user iPhone app, and I am trying to finish up the coding for the user login in process. I can successfully create an account, and store the data the user inputs into the Core Data DB, and the pin into the Keychain, so now I am trying to complete the login process. The following code listed below is what I have so far, I am getting an error, No visible @interface for ‘Account’ declares the selector ‘password:’

- (IBAction)processLogin:(id)sender {

// hide keyboard
[_textFieldUsername resignFirstResponder];
[_textFieldPin resignFirstResponder];


// First - make activity indicator visible, then start animating, then turn of wrong user / pin label
_welcomeActivityIndicator.hidden = FALSE;
[_welcomeActivityIndicator startAnimating];
[_wrongUserPin setHidden:YES];

// check if username and pin text fields are populated
if ([_textFieldUsername.text length ] == 0 &&  [_textFieldPin.text length ] == 0)
{
    [_welcomeActivityIndicator stopAnimating];
    [_wrongUserPin setHidden:NO];   
}

// CORE DATA
// NSManagedObjectContext *context = _managedObjectContext;

NSFetchRequest *request= [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Account" inManagedObjectContext:_managedObjectContext];
NSPredicate *predicate =[NSPredicate predicateWithFormat:@"username=%@",self.textFieldUsername.text];

// TODO check pin
Account *pinAccount = [[Account alloc] init];

// GETTING ERROR ON BELOW LINE OF CODE! - ERR0R - No visible @interface for 'Account' declares the selector 'password:'
[pinAccount password:_textFieldPin.text];


[request setEntity:entity];
[request setPredicate:predicate];

NSError *error = nil;

NSArray *array = [_managedObjectContext executeFetchRequest:request error:&error];
if (array != nil) {
    NSUInteger count = [array count]; // may be 0 if the object has been deleted.
    NSLog(@"Username may exist, %@",count);
}

else {
    NSLog(@"Username does not exist.");
}
}

The Account class files m and h look like the following:

Account.m

- (NSString*)password 
{
if (self.username)
    return [KeychainHelper getPasswordForKey:self.username];
return nil;
}

- (void)setPassword:(NSString*)aPassword 
{
if (self.username) [KeychainHelper setPassword:aPassword forKey:self.username];


}
- (void)prepareForDeletion
{
if (self.username) [KeychainHelper removePasswordForKey:self.username];
}
@end

Account.h

#import "AccountBase.h"

@interface Account : AccountBase {

}

// nonatomic - don't worry about multithreading

@property (nonatomic, assign) NSString *password;

- (void)setPassword:(NSString*)aPassword;

@end

I would appreciate any ideas or thoughts, and thanks for reading.

  • 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-06-06T18:35:09+00:00Added an answer on June 6, 2026 at 6:35 pm

    I was able to check / verify the pin with the following code.

    // CORE DATA
    NSFetchRequest *request = [[NSFetchRequest alloc] init];
    NSEntityDescription *entity = [NSEntityDescription entityForName:@"Account" inManagedObjectContext:_managedObjectContext];
    
    // set entity for request
    [request setEntity:entity];
    
    // filter results using a predicate
    NSPredicate *pred =[NSPredicate predicateWithFormat:(@"username = %@"), _textFieldUsername.text];
    
    // set predicate for the request
    [request setPredicate:pred];
    
    NSError *error = nil;
    
    // store DB usernames in results array
    NSArray *results = [_managedObjectContext executeFetchRequest:request error:&error];
    
    NSLog(@"The returned results are %@",results);
    
    
    // check text field against results stored in DB
    for (Account *anAccount in results) {
        if ([anAccount.username isEqualToString:_textFieldUsername.text]){
            NSLog(@"Your username exists");
            if ([anAccount.password isEqualToString:_textFieldPin.text]){
                NSLog(@"Your pin is correct");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a multi-user iPhone app, and I am trying to finish up
I am creating an iPhone app where the user can send their work in
Creating a google map with store locations within 50 miles of user entered address.
I'm creating a multi-user/company web application in PHP & MySQL. I'm interested to know
I am considering creating my own web based, multi user password management software. The
I am creating a Wordpress website for multi author and want to set user
Has anyone created or read an article on creating a multi-factor login system for
I'm building a multi user system and I'm creating an somewhat experimental idea for
My company is currently in the process of creating a large multi-tier software package
I'm in the process of creating a web app in PHP which will be

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.