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

  • Home
  • SEARCH
  • 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 7690581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:25:50+00:00 2026-05-31T20:25:50+00:00

I realize this question is pretty basic, but I’m really stuck. I have a

  • 0

I realize this question is pretty basic, but I’m really stuck. I have a plist. I’m trying to read that into an array so I can work with it in various classes. So in one class I have:

+ (NSArray*)questionArray
{
static NSArray* questions = nil;

if(!questions)
{
    NSString *path = [[NSBundle mainBundle] pathForResource:@"Questions" ofType:@"plist"];
    NSDictionary *dic = [[NSDictionary alloc] initWithContentsOfFile:path];
    NSArray *questionsArray = [dic objectForKey:@"groups"];
    NSMutableArray *questionObjects = [[NSMutableArray alloc] initWithCapacity:     [questionsArray count]]; 

    for(NSDictionary* questionDic in questionsArray)
    {
        QuestionContainerObject* object = [[self alloc] initWithDictionary:questionDic];

        [questionObjects addObject:object];
        [object release];
    }

    questions = questionObjects;

    [dic release];
}

return questions;
}

I want to be able to access the things I pull out of the array from another class. I tried calling it like NSString *str = [QuestionContainerObject questionArray]; from my other class (after importing the header) but I get the ‘class method +questionArray not found’ warning.

Can someone please point me in the right direction? I’m really lost! Thanks!!

  • 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-31T20:25:51+00:00Added an answer on May 31, 2026 at 8:25 pm

    The warning is because the compiler does not know the questionArray method exists.
    define this method in the header (QuestionContainerObject.h)

    @interface QuestionContainerObject
    + (NSArray*)questionArray;
    @end
    

    and in the file using it:

    #import QuestionContainerObject.h
    

    Also remember to release objects created using [class alloc]

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

Sidebar

Related Questions

Ok so I realize that this is a pretty vague question, but bear with
I realize that this question has been asked 100times but none that I have
I realize this is a basic question but I have searched online, been to
I realize that this question is impossible to answer absolutely, but I'm only after
I realize that this question is pretty well discussed, however I would like to
I realize that this question is pretty much the exact question found here .
I do realize that this question seems very well known, but since I don't
I realize this perhaps a naive question but still I cant figure out how
I realize that the query this question is looking for won't be enough to
I realize this is more of a hardware question, but this is also very

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.