Xcode error: unable to dequeue a cell with identifier MealTableViewCell
<p>I have been following the apple tutorial <a href="https://developer.apple.com/library/ios/referencelibrary/GettingStarted/DevelopiOSAppsSwift/Lesson7.html#//apple_ref/doc/uid/TP40015214-CH8-SW1" rel="noreferrer">here</a> and have come across an error:</p>

<pre><code>2016-01-12 09:34:32.909 FoodTracker[1812:124509] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier MealTableViewCell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'
</code></pre>

<p>The error appears when the program is run, and the red highlighted line appears on the class line of AppDelegate.swift</p>

<p>These are the lines of code I believe are causing the error, as I found out through breakpoints:</p>

<pre><code>override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
    let cellIdentifier = "MealTableViewCell"
    let cell = tableView.dequeueReusableCellWithIdentifier(cellIdentifier, forIndexPath: indexPath) as! MealTableViewCell

    // Configure the cell...
    let meal = meals[indexPath.row]

    cell.nameLabel.text = meal.name
    cell.photoImageView.image = meal.photo
    cell.ratingControl.rating = meal.rating


    return cell

}
</code></pre>

<p>I have looked around online, and a lot of answers have said to ensure that the TableCell has an identifier, however mine does and the error still pops up.</p>

<p>Please let me know if I need to post any more info.</p>

<p>Thanks in advance</p>