ios - GADInterstitial crash in init -


i'm adding google admob fullscreen ads

m_interstitial = [[gadinterstitial alloc] initwithadunitid:admob_fs_id]; // crash here!!! m_interstitial.delegate = self;  gadrequest* request = [gadrequest request]; request.testdevices = @[ @"xxxxxxxxxxxxxxxxxxxxxxxxxx" ]; [m_interstitial loadrequest:request]; 

but app crash @ init line. i'm using admob ios sdk 7.3.1. crash report below

2015-06-03 00:22:17.077 xxx[17213:4624660] -[gadinterstitialviewcontroller setslot:]: unrecognized selector sent instance 0x14e4b6f0 2015-06-03 00:22:17.079 xxx[17213:4624660] *** terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[gadinterstitialviewcontroller setslot:]: unrecognized selector sent instance 0x14e4b6f0' *** first throw call stack: (0x29e9a5a7 0x37a80c77 0x29e9fa6d 0x29e9d949 0x29dceb68 0x1dc9f4 0x19b8b4 0xd3923 0xe488d 0x2d3b437b 0x2d418553 0x2d4184dd 0x2d3945e7 0x29e61275 0x29e5e959 0x29e5ed5b 0x29dabb51 0x29dab963 0x312ea1a9 0x2d3fdc91 0x102011 0x38029aaf) libc++abi.dylib: terminating uncaught exception of type nsexception 

whats matter?

edit: whole code below

in appdelegate.m

- (void)shownag {     // gad full     //    m_interstitial = [[gadinterstitial alloc] initwithadunitid:admob_fs_id];     m_interstitial = [[gadinterstitial alloc] init];     m_interstitial.adunitid = admob_fs_id;     m_interstitial.delegate = self;      gadrequest* request = [gadrequest request];     request.testdevices = @[ @"251a8278d43c4c1468ce2d807a0ccc72" ];     [m_interstitial loadrequest:request]; } 

viewcontroller.m

- (void)viewdidappear:(bool)animated {     [super viewdidappear:animated];      appdelegate* delegate = (appdelegate*)[[uiapplication sharedapplication] delegate];     [delegate shownag]; } 

i got it. had named gadviewcontroller.h/m files. made conflict gad framework. framework has same named files. renamed files , works now.


Comments