Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

Unable to dequeue a cell in - Rebuilding from Scratch > Adding a Table View Controller Class

I receive the following error when trying to run my app. There isn't any yellow or red errors in Xcode to spot which line is the issue or what is wrong. What should I register and where?

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier Cell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'

I thought I was able to fix it by changing the cell to lower case but it keeps happing.

5 Answers

Ah, did you add your custom cell class to the cell on the storyboard? I believe you have to add the identifier as well as a custom cell class if you are using one.

In the header file I get an error on;

return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));

Full code:

` #import <UIKit/UIKit.h>

import "AppDelegate.h"

int main(int argc, char *argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } }

`

Well, just get the project files like I did,

Because I also some problems with that Lesson Also, I was forced to download the Project Files, good thing they are there. Xcode didn't work for me on the StoryBoard -> Table linking + it didn't create any functions / method that were automatically in the video.

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

I fix exactly the same error after 5:40 minutes into the video.

Yep, I watched that video a few times and know you mentioned it but couldn't figure out what the issue was. I finally did, which was I need to hit the Return key after typing the word Cell in the identifier on the main.storyboard.

The Return key....

I had the same error as Joseph. I rebuilt it from scratch again and followed the tutorial, I found that if I named the Restoration ID in the MainStoryBoard to be "cell" before adding in the reference in the tableViewController.m "cell.textLabel.text = [self.titles objectAtIndex:indexPath.row];"

Then it worked with no errors.

I had this problem also, like ryan said, cut and paste the code again to the viewcontroller than it will function.