Errors in running Figure 28.10 - Displaying the contacts

New to Apple development: xCode/Objective-C/Swift

I checked the code with the code in the book and believe I have followed all steps to this point correctly, but when I try and run, I receive the following error below. Looking to try and figure out what I did wrong.

2017-08-27 23:27:54.844 Contacts[1388:68563] *** Terminating app due to uncaught exception ‘NSUnknownKeyException’, reason: ‘[<ContactsViewController 0x7fef33d0c8f0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key dataSource.’
*** First throw call stack:
(
0 CoreFoundation 0x000000010677cd4b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00000001061de21e objc_exception_throw + 48
2 CoreFoundation 0x000000010677cc99 -[NSException raise] + 9
3 Foundation 0x0000000105cec9df -[NSObject(NSKeyValueCoding) setValue:forKey:] + 291
4 UIKit 0x0000000106d3b293 -[UIViewController setValue:forKey:] + 88
5 UIKit 0x0000000106faf79e -[UIRuntimeOutletConnection connect] + 109
6 CoreFoundation 0x00000001067219e0 -[NSArray makeObjectsPerformSelector:] + 256
7 UIKit 0x0000000106fae122 -[UINib instantiateWithOwner:options:] + 1867
8 UIKit 0x0000000106d419c5 -[UIViewController _loadViewFromNibNamed:bundle:] + 386
9 UIKit 0x0000000106d422e7 -[UIViewController loadView] + 177
10 UIKit 0x0000000106fc214c -[UITableViewController loadView] + 84
11 UIKit 0x0000000106d4261c -[UIViewController loadViewIfRequired] + 201
12 UIKit 0x0000000106d42e70 -[UIViewController view] + 27
13 UIKit 0x0000000106c0c4b5 -[UIWindow addRootViewControllerViewIfPossible] + 71
14 UIKit 0x0000000106c0cc06 -[UIWindow _setHidden:forced:] + 293
15 UIKit 0x0000000106c20519 -[UIWindow makeKeyAndVisible] + 42
16 UIKit 0x0000000106b98f8d -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4818
17 UIKit 0x0000000106b9f0ed -[UIApplication _runWithMainScene:transitionContext:completion:] + 1731
18 UIKit 0x0000000106b9c26d -[UIApplication workspaceDidEndTransaction:] + 188
19 FrontBoardServices 0x0000000109d726cb FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 24
20 FrontBoardServices 0x0000000109d72544 -[FBSSerialQueue _performNext] + 189
21 FrontBoardServices 0x0000000109d728cd -[FBSSerialQueue _performNextFromRunLoopSource] + 45
22 CoreFoundation 0x0000000106721761 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
23 CoreFoundation 0x000000010670698c __CFRunLoopDoSources0 + 556
24 CoreFoundation 0x0000000106705e76 __CFRunLoopRun + 918
25 CoreFoundation 0x0000000106705884 CFRunLoopRunSpecific + 420
26 UIKit 0x0000000106b9aaea -[UIApplication _run] + 434
27 UIKit 0x0000000106ba0c68 UIApplicationMain + 159
28 Contacts 0x0000000105c0889f main + 111
29 libdyld.dylib 0x00000001095de68d start + 1
30 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

it looks like your ContactsViewController isn’t conforming to datasource protocol.

Maybe you forgot to write something like:

class ContactsViewController: UITableViewDataSource....