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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:25:25+00:00 2026-05-26T18:25:25+00:00

I am creating one sample application in which i am reading database and displaying

  • 0

I am creating one sample application in which i am reading database and displaying user image and name into tableview.
but i am getting following exception

[UIApplication userListMutableArray]: unrecognized selector sent to instance 0x6816330

following is my code snippet

AppDelegate *appDelegate = (AppDelegate*)[UIApplication sharedApplication];

if(sqlite3_open([dbPath UTF8String], &database)==SQLITE_OK)
{
  const char *sql = "select NAME,IMAGE from user";
    sqlite3_stmt *selectstmt;

    if(sqlite3_prepare_v2(database, sql, -1, &selectstmt, NULL)==SQLITE_OK)
    {
        while (sqlite3_step(selectstmt) == SQLITE_ROW) {

            UserData *userData = [[UserData alloc] init];
            userData.userName = [NSString stringWithUTF8String:(char*)sqlite3_column_text(selectstmt, 0)];
            NSData *data = [[NSData alloc] initWithBytes:sqlite3_column_blob(selectstmt, 1) length:sqlite3_column_bytes(selectstmt, 1)];
            if(data == nil)
                NSLog(@"image not found");
            userData.userImage = [UIImage imageWithData:data];


            **[appDelegate.userListMutableArray addObject:userData];**
        }

    }
}
else
{
    sqlite3_close(database);
}

[appDelegate.userListMutableArray addObject:userData];

above line is giving exception but i am not able to track problem. 🙁

  • 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-26T18:25:26+00:00Added an answer on May 26, 2026 at 6:25 pm

    Your appDelegate variable is pointing to the UIApplication and not its delegate property. Change this assignment…

    AppDelegate *appDelegate = (AppDelegate*)[UIApplication sharedApplication];
    

    to…

    AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating an android application in which there are two activites. One activity
I am creating a PHP based web application which requires simple authentication to use.
I am creating Windows Application in C# in which I want to write in
i am creating windows application in C# in which i want to write in
I am running creating an iPhone application which performs a costly operation and I
I've started maintaining an application, which comes with a big database, which is partly
I'm developing a PHP application which uses Twig (but that's unimportant) as the view
I'm creating a MVC-application which currently uses EditorFor to gennerate a lot of views.
I am currently creating an application which works out the magnitude at a predefined
I have an application which is running on tomcat, one of the methods is,

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.