2d iOS v. 2.0; Chapter 12 - Pest Control - Beginning Tile Maps

I Chapter 12: Beginning Tile Maps at the top of page 319 it tells you to build and run your app. I am getting the following error. Can anyone please explain how to fix?

2016-10-20 08:27:42.066433 PestControl[3552:152092] subsystem: com.apple.UIKit, category: HIDEventFiltered, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0
2016-10-20 08:27:42.069326 PestControl[3552:152092] subsystem: com.apple.UIKit, category: HIDEventIncoming, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0
2016-10-20 08:27:42.077824 PestControl[3552:152084] subsystem: com.apple.BaseBoard, category: MachPort, enable_level: 1, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0, enable_private_data: 0
2016-10-20 08:27:42.089249 PestControl[3552:152028] subsystem: com.apple.UIKit, category: StatusBar, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2, enable_private_data: 0
2016-10-20 08:27:42.091398 PestControl[3552:152028] subsystem: com.apple.BackBoardServices.fence, category: App, enable_level: 1, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 0, privacy_setting: 0, enable_private_data: 0
2016-10-20 08:27:42.154 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.
2016-10-20 08:27:42.155 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.
2016-10-20 08:27:42.155 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.
2016-10-20 08:27:42.155 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.
2016-10-20 08:27:42.155 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.
2016-10-20 08:27:42.155 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.
2016-10-20 08:27:42.156 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.
2016-10-20 08:27:42.156 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.
2016-10-20 08:27:42.156 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.
2016-10-20 08:27:42.156 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.
2016-10-20 08:27:42.156 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.
2016-10-20 08:27:42.232 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.
2016-10-20 08:27:42.233 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.
2016-10-20 08:27:42.233 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.
2016-10-20 08:27:42.233 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.
2016-10-20 08:27:42.233 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.
2016-10-20 08:27:42.234 PestControl[3552:152028] SKUtil.m: MGGetBoolAnswer is not available in the simulator.
2016-10-20 08:27:42.239 PestControl[3552:152028] *** Terminating app due to uncaught exception ‘NSRangeException’, reason: ‘*** -[NSKeyedUnarchiver decodeInt32ForKey:]: value (9223372036854775807) for key (_defaultTileGroupIndex) too large to fit in 32-bit integer’
*** First throw call stack:
(
0 CoreFoundation 0x032b7212 __exceptionPreprocess + 194
1 libobjc.A.dylib 0x00614e66 objc_exception_throw + 52
2 Foundation 0x00247d39 -[NSCoder(Exceptions) __failWithException:] + 133
3 Foundation 0x00247ec3 -[NSCoder(Exceptions) __failWithExceptionName:errorCode:format:] + 391
4 Foundation 0x00151a6c _decodeInt64 + 769
5 Foundation 0x001a1acc -[NSKeyedUnarchiver decodeInt32ForKey:] + 199
6 Foundation 0x0015168b -[NSCoder decodeIntegerForKey:] + 32
7 SpriteKit 0x00abd3b4 -[SKTileSet initWithCoder:] + 325
8 Foundation 0x0014b4ee _decodeObjectBinary + 3730
9 Foundation 0x0014c9b7 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1994
10 Foundation 0x00150e3e -[NSArray(NSArray) initWithCoder:] + 251
11 Foundation 0x0014b4ee _decodeObjectBinary + 3730
12 Foundation 0x0014a54b _decodeObject + 251
13 Foundation 0x0014a400 -[NSKeyedUnarchiver decodeObjectForKey:] + 196
14 SpriteKit 0x00abe963 +[SKTileSet findTileSetInBundleNamed:] + 1587
15 SpriteKit 0x00abee17 +[SKTileSet tileSetNamed:] + 101
16 SpriteKit 0x00b4a8d8 -[SKTileMapNode initWithCoder:] + 472
17 Foundation 0x0014b4ee _decodeObjectBinary + 3730
18 Foundation 0x0014c9b7 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1994
19 Foundation 0x00150e3e -[NSArray(NSArray) initWithCoder:] + 251
20 Foundation 0x0014b4ee decodeObjectBinary + 3730
21 Foundation 0x0014a54b decodeObject + 251
22 Foundation 0x0014a400 -[NSKeyedUnarchiver decodeObjectForKey:] + 196
23 SpriteKit 0x00acbf35 -[SKNode initWithCoder:] + 2192
24 SpriteKit 0x00ae6a08 -[SKEffectNode initWithCoder:] + 76
25 SpriteKit 0x00a91a7a -[SKScene initWithCoder:] + 102
26 PestControl 0x000b0441 TFC11PestControl9GameScenecfT5coderCSo7NSCoder_GSqS0
+ 81
27 PestControl 0x000b04df TToFC11PestControl9GameScenecfT5coderCSo7NSCoder_GSqS0
+ 47
28 SpriteKit 0x00acb800 -[SKNode initWithCoder:] + 347
29 SpriteKit 0x00ae6a08 -[SKEffectNode initWithCoder:] + 76
30 SpriteKit 0x00a91a7a -[SKScene initWithCoder:] + 102
31 Foundation 0x0014b4ee _decodeObjectBinary + 3730
32 Foundation 0x0014a54b decodeObject + 251
33 Foundation 0x0014a400 -[NSKeyedUnarchiver decodeObjectForKey:] + 196
34 SpriteKit 0x00acb119 +[SKNode nodeWithFileNamed:] + 620
35 PestControl 0x000b0969 TTOFCSo7SKSceneCfT9fileNamedSS_GSqS
+ 105
36 PestControl 0x000b076a TFC11PestControl18GameViewController11viewDidLoadfT_T + 346
37 PestControl 0x000b0a12 TToFC11PestControl18GameViewController11viewDidLoadfT_T + 34
38 UIKit 0x00e6ef52 -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 38
39 UIKit 0x00e73a3c -[UIViewController loadViewIfRequired] + 1431
40 UIKit 0x00e73f85 -[UIViewController view] + 29
41 UIKit 0x00d1aaeb -[UIWindow addRootViewControllerViewIfPossible] + 72
42 UIKit 0x00d1b233 -[UIWindow _setHidden:forced:] + 335
43 UIKit 0x00d1b6cb -[UIWindow _orderFrontWithoutMakingKey] + 30
44 UIKit 0x00d30248 -[UIWindow makeKeyAndVisible] + 64
45 UIKit 0x00c9da06 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 5053
46 UIKit 0x00ca48ac -[UIApplication _runWithMainScene:transitionContext:completion:] + 2004
47 UIKit 0x00cc5e98 __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke.3124 + 53
48 UIKit 0x00ca14ca -[UIApplication workspaceDidEndTransaction:] + 172
49 FrontBoardServices 0x09c38ecd __37-[FBSWorkspace clientEndTransaction:]_block_invoke_2 + 59
50 FrontBoardServices 0x09c389ed __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 49
51 FrontBoardServices 0x09c6271c FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 23
52 FrontBoardServices 0x09c6257d -[FBSSerialQueue _performNext] + 166
53 FrontBoardServices 0x09c6295d -[FBSSerialQueue _performNextFromRunLoopSource] + 52
54 FrontBoardServices 0x09c61d77 FBSSerialQueueRunLoopSourceHandler + 29
55 CoreFoundation 0x03256cbf CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 15
56 CoreFoundation 0x0323adf7 __CFRunLoopDoSources0 + 519
57 CoreFoundation 0x0323a284 __CFRunLoopRun + 1124
58 CoreFoundation 0x03239bab CFRunLoopRunSpecific + 395
59 CoreFoundation 0x03239a0b CFRunLoopRunInMode + 123
60 UIKit 0x00c9fb43 -[UIApplication _run] + 542
61 UIKit 0x00ca67fb UIApplicationMain + 148
62 PestControl 0x000b1b41 main + 145
63 libdyld.dylib 0x040c3799 start + 1
64 ??? 0x00000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

@juicysquid - That’s a tricky one as you won’t actually have entered any code yet.

If you build and run the Final sample code, does that work?

I just went through the text again just to make sure and it works for me. What version of Xcode are you on?