0

The following error will appear when I add in InMobi iOS:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[IMAdView initWithFrame:imAppId:imAdUnit:rootViewController:]: unrecognized selector sent to instance 0xb9e2080'

I have the following:

・ AdMob Mediation SDK add
・ InMobi adapter and SDK add
・ Other Linker Flags add -ObjC and -all_load**

Still missing something? Do you need or import?

Sohan
  • 1,287
  • 1
  • 15
  • 29

2 Answers2

0

It looks like you aren't calling this method on a proper IMAdView object. As per the documentation, this works:

IMAdView *someAdView = [[IMAdView alloc] initWithFrame:CGRectMake(0, 0, 320, 50) imAppId:@"YOUR_INMOBI_APP_ID" imAdSize:IM_UNIT_320x50 rootViewController:self];

You have to allocate an object with alloc before initializing it.

Andreas Ley
  • 9,109
  • 1
  • 47
  • 57
  • Thank you for an answer. I think the above is seen as the implementation of a custom event, and supports the standard "InMobi" in "AdMob Mediation". Will do as a custom event implementation? – user1785325 Oct 31 '12 at 00:54
  • @user1785325 Not sure what you mean. :( – Andreas Ley Oct 31 '12 at 09:52
0

I had this problem, too, when I updated my Google AdMob SDK to ver 6.4.2, and the InMobiAdMobiOSAdapter, to whatever the latest version is, but neglected to update the inMobi SDK to 3.7.0.

On this page: https://developers.google.com/mobile-ads-sdk/docs/admob/mediation-networks look at the row for InMobi. You have to download both the adapter("adapter for iOS") and the SDK ("Download iOS"), and incorporate them into your project.

daver
  • 416
  • 4
  • 6