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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:42:00+00:00 2026-05-27T16:42:00+00:00

Im having issues with my code, its returning an error that says… 2011-12-24 22:52:36.280

  • 0

Im having issues with my code, its returning an error that says…

2011-12-24 22:52:36.280 BusinessManager[479:20b] * Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘* -[NSCFDictionary isEqualToString:]: unrecognized selector sent to instance 0x3e965e0’>

Here is the code:

 #import "BusinessManagerAppDelegate.h"
 #import "ProspectViewController.h"
 #import "JSON.h"

 @implementation ProspectViewController

 @synthesize jsonArray;

- (void)viewDidLoad {
NSURL *jsonURL = [NSURL URLWithString:@"https://www.mysite.php"];
NSString *jsonData = [[NSString alloc] initWithContentsOfURL:jsonURL];

NSLog(jsonData);
self.jsonArray = [jsonData JSONValue]; 

[jsonURL release];
[jsonData release];
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section      {
return [jsonArray count];
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {    
static NSString *Prospects = @"agencyname";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:Prospects];
if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:Prospects] autorelease];
}

cell.text = (NSString *)[self.jsonArray objectAtIndex:indexPath.row];
return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath   *)indexPath {

}

- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
}

- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
}

- (void)viewWillDisappear:(BOOL)animated {
}

- (void)viewDidDisappear:(BOOL)animated {
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {   
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning]; 
}

- (void)dealloc {
[jsonArray dealloc];
[super dealloc];
}

@end

Im pretty sure I have everything set up correctly and the JSON is returning correctly in the console.

  • 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-27T16:42:00+00:00Added an answer on May 27, 2026 at 4:42 pm

    cell.textLabel.text = (NSString *)[self.jsonArray objectAtIndex:indexPath.row];
    (EDIT: Note that the original code was accessing cell.text rather than cell.textLabel.text)

    This line is likely the error. Let’s look at it step by step:
    1. The JSON output is an array, stored in jsonArray (check to make sure it’s not a dictionary too).
    2. [self.jsonArray objectAtIndex:indexPath.row] is likely an NSDictionary. As you can see from the exception that’s returning, it involves a NCSFDictionary. In fact, many times, JSON outputs are arrays of dictionaries
    3. With the error ‘NSInvalidArgumentException’, reason: ‘* -[NSCFDictionary isEqualToString:]: unrecognized selector sent to instance 0x3e965e0’>, the code is trying to compare an NSDictionary to an NSString.
    4. To solve this, look at the JSON output more carefully and dissect it! And make sure that the JSON output isn’t varying from case to case (with different URLs).

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

Sidebar

Related Questions

I'm having issues with a bit of code that I am writing in C#.
I'm having some issues with some jQuery code, and I'm hoping and thinking that
I'm trying to learn C++ currently, but I'm having issues with the code below.
I'm having some issues with my code. This is probably due to some design
Hello everyone I'm currently having 2 issues with the code below: Upon return of
I am having some issues with logging. After reviewing JBoss Seam source code, I
I'm having issues with a custom signal in a class I made. Relevant code:
I'm working with some OpenGL code for scientific visualization and I'm having issues getting
I am having issues with a while loop that draws data out of a
I am having issues with ie 8 compatibility mode. I have some buttons that

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.