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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:18:18+00:00 2026-05-18T12:18:18+00:00

I’m trying to save an NSArray as a value in an NSMutableDictionary. When I

  • 0

I’m trying to save an NSArray as a value in an NSMutableDictionary. When I try to fetch what I’ve added, it returns an NSFCArray instead of an NSArray:

NSArray * list = [NSArray arrayWithObjects:@"one", @"two", @"three", nil];
NSMutableDictionary * dictionary = [[NSMutableDictionary alloc] init];
for (NSString *name in list) {
    // first attempt
    [dictionary setObject:[NSMutableArray arrayWithObject:@"test"] forKey:name];
    NSLog(@"first attempt class: %@", [[dictionary valueForKey:name] class]);
    // second attempt
    NSArray * realArray = [[NSArray alloc] initWithArray:[dictionary valueForKey:name]];
    NSLog(@"second attempt class: %@", [realArray class]);
}

I assume this is being converted for efficiency. However, I need my value returned as an NSArray to call methods like “count” that NSFCArray doesn’t have. If I can’t store values in a dictionary as an NSArray, how can I convert to a NSArray from a NSFCArray?

  • 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-18T12:18:18+00:00Added an answer on May 18, 2026 at 12:18 pm

    NSCFArray == NSArray, it’s exposing the “toll-free bridged“ side of Foundation objects.

    You can do everything with an NSCFArray as you can with an NSArray, and vice versa. You can pass an NSArray to a CFArray function and you can pass a CFArray to an NSArray method.

    This is because the internal datatype that is known to us as NSArray or CFArray is actually a NSCFArray.

    This doesn’t apply to all Foundation objects, here is a list of all toll-free bridged objects in Cocoa:

    alt text

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

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to loop through a bunch of documents I have to put
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm making a simple page using Google Maps API 3. My first. One marker
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Seemingly simple, but I cannot find anything relevant on the web. What is the

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.