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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:06:18+00:00 2026-06-18T11:06:18+00:00

So I am really new at developing for iOS, and I’ve been doing my

  • 0

So I am really new at developing for iOS, and I’ve been doing my best, to search for an answer, to debug it and anything I could come up with.

Though, I haven’t been able to find a solution to the issue.

I’ve been trying to fetch an external JSON document, which works fine, but when it comes to parsing it, it buggers up.

First of all, this is the error message I’m getting, the whole lot of it.

2013-01-31 22:40:19.261 demodh[6205:c07] View Loaded
2013-01-31 22:40:19.479 demodh[6205:c07] -[__NSCFStringcountByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x7554f90 
2013-01-31 22:40:19.480 demodh[6205:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x7554f90'
*** First throw call stack:
(0x1c93012 0x10d0e7e 0x1d1e4bd 0x1c82bbc 0x1c8294e 0x28d3 0xbd6589 0xbd4652 0xbd589a 0xbd460d 0xbd4785 0xb21a68 0x4615911 0x4614bb3 0x4652cda 0x1c358fd 0x465335c 0x46532d5 0x453d250 0x1c16f3f 0x1c1696f 0x1c39734 0x1c38f44 0x1c38e1b 0x1bed7e3 0x1bed668 0x14ffc 0x1d6d 0x1c95 0x1)
libc++abi.dylib: terminate called throwing an exception
(lldb) 

And this is the code I’m using at the moment:

- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
    NSDictionary *allDataDictionary = [NSJSONSerialization JSONObjectWithData:webData options:0 error:nil];

    for(NSDictionary *dict in allDataDictionary)
    {
        if (![allDataDictionary isKindOfClass:[NSDictionary class]])
        {
            NSLog(@"2Unable to process temp array because it's an instance of %@", [allDataDictionary class]);
        }
        else
        {
            for(NSDictionary *deal in dict)
            {
                if (![deal isKindOfClass:[NSDictionary class]])
                {
                    NSLog(@"Unable to process temp array because it's an instance of %@", [deal class]);
                }
                else
                {
                    NSString *title = [deal objectForKey:@"title"];
                    NSLog(title);
                }
            }
        }

    }
}

And the JSON I’m loading is: Link

I hope you’re able to assist me in finding a solution.

  • 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-18T11:06:19+00:00Added an answer on June 18, 2026 at 11:06 am

    The problem is you’re fast-enumerating a NSDictionary and expecting to get its values, when in fact you’ll get its keys. When you try to fast-enumerate an NSString you get the assertion you’re seeing. You probably wanted this:

    for(NSObject *key in allDataDictionary) {
        NSDictionary *dict = allDataDictionary[key];
        ...
        for (NSObject *dealKey in dict) {
             NSDictionary *deal = dict[dealKey];
        }
        ...
    

    Alternatively, if you really want to enumerate the values and don’t need the keys:

    for(NSDictionary *dict in [allDataDictionary allValues]) {
        ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm really new to this, and I've been going through the YARD docs ,
I am really new to Ruby and could use some help with a program.
So am really new with android app developing and i came across the Electric
I am relatively new to developing Cocoa applications on the Mac and come from
I have been developing a new JavaScript application which is rapidly growing in size.
It's been more than an year that i'm developing a new scripting language with
I'm really new to web developing...I'm trying to draw area graph on JSP (this
I'm new to Android developing and I would really appreciate some help here. I'm
I have been pondering about developing a new application with rails (probably without models?).
I'm new to developing for Android and got really excited when I made my

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.