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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:49:15+00:00 2026-06-05T14:49:15+00:00

I have an NSMutableArray which gets objects added to it from an NSDictionary. These

  • 0

I have an NSMutableArray which gets objects added to it from an NSDictionary.
These objects are values of either 1 or 0.
I am trying to loop through this NSMutableArray, to check each value. If it is 1, I set add a green tick image to an array, if it is zero, I add a red cross image to an array.

However I am getting the following error on checking the values of the NSMutableArray:

[__NSArrayI isEqualToString:]: unrecognized selector sent to instance

Here is my code:

     facilitiesAvailable = [NSMutableArray new];

     [facilitiesAvailable addObject:[[InfoDictionary valueForKey:@"wc-avail"]copy]];
     [facilitiesAvailable addObject:[[InfoDictionary valueForKey:@"wifi_avail"]copy]];

    tixArray = [NSMutableArray new];

    for(NSString *avail in facilitiesAvailable) {

        if([avail isEqualToString:@"1"]) {

            [tixArray addObject:[UIImage imageNamed:@"greenTick.png"]];
        } else {

            [tixArray addObject:[UIImage imageNamed:@"redCross.png"]];
        }

    }

What am I doing wrong?

  • 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-05T14:49:17+00:00Added an answer on June 5, 2026 at 2:49 pm

    The message:

     [__NSArrayI isEqualToString:]: unrecognized selector sent to instance
    

    means that avail is an NSArray object and not an NSString as you expected, hence the error. You should check how you populate your InfoDictionary dictionary, since it comes from there.

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

Sidebar

Related Questions

I have this NSMutableArray which is a collection of objects that are being moved
i have a nsmutablearray which have 5 objects. for example if it contain objects
I have a NSMutableArray which i am initializing from a plist with strings. but
I have an NSMutableArray which returns me some object. The object which I added
Assuming I have an NSMutableArray which is loaded from file: searchTermsArray = [[NSMutableArray alloc]
I have a function which returns an NSMutableArray which is fetched from CoreData .
I have an NSMutableArray which holds other NSMutableArrays (I'll call them sub-arrays). These sub-arrays
I have an NSMutableArray which can hold several objects. I would like to check
I have a NSMutableArray in my app which I initiate like this: H-FILE NSMutableArray
I have an NSMutableArray of objects in Objective C. I'm filling this up based

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.