I am trying to implement a very simple iAd into my game and I am getting an error. I am new to Xcode and have trouble reading error codes. I've tried the exact same method in a new SpriteKit project and it worked perfectly. I'm guessing this must have something to do with my game.
The error is as follows.
2014-03-30 17:18:35.966 MyGame[672:60b] -[UIView setPaused:]: unrecognized selector sent to instance 0xa764120
2014-03-30 17:18:35.970 MyGame[672:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView setPaused:]: unrecognized selector sent to instance 0xa764120'
*** First throw call stack:
(
0 CoreFoundation 0x019901e4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x0170f8e5 objc_exception_throw + 44
2 CoreFoundation 0x01a2d243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x0198050b ___forwarding___ + 1019
4 CoreFoundation 0x019800ee _CF_forwarding_prep_0 + 14
5 MyGame 0x00012331 -[AppDelegate applicationDidBecomeActive:] + 225
6 UIKit 0x002a6ca6 -[UIApplication _stopDeactivatingForReason:] + 329
7 UIKit 0x002ac891 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 1378
8 UIKit 0x002c0f92 -[UIApplication handleEvent:withNewEvent:] + 3517
9 UIKit 0x002c1555 -[UIApplication sendEvent:] + 85
10 UIKit 0x002ae250 _UIApplicationHandleEvent + 683
11 GraphicsServices 0x025d9f02 _PurpleEventCallback + 776
12 GraphicsServices 0x025d9a0d PurpleEventCallback + 46
13 CoreFoundation 0x0190bca5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
14 CoreFoundation 0x0190b9db __CFRunLoopDoSource1 + 523
15 CoreFoundation 0x0193668c __CFRunLoopRun + 2156
16 CoreFoundation 0x019359d3 CFRunLoopRunSpecific + 467
17 CoreFoundation 0x019357eb CFRunLoopRunInMode + 123
18 UIKit 0x002abd9c -[UIApplication _run] + 840
19 UIKit 0x002adf9b UIApplicationMain + 1225
20 MyGame 0x0001250d main + 141
21 libdyld.dylib 0x02ad8701 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
My ViewController.m is as follows
- (void)viewDidLoad
{
[super viewDidLoad];
// Configure the view.
SKView * skView = (SKView *)self.view;
skView.showsFPS = YES;
skView.showsNodeCount = YES;
// Create and configure the scene.
SKScene * scene = [StartGameScene sceneWithSize:skView.bounds.size];
scene.scaleMode = SKSceneScaleModeAspectFill;
self.canDisplayBannerAds = YES;
// Present the scene.
[skView presentScene:scene];
}