0

I implemented Adwhirl into my new universal app. And was able to get the admob adapter running for Ipad... With help form this great answer...

Now I am stuck implementing InMobi.

I try to change the get ad function but it does not seem to work for me:

IMAdView *inMobiView;
    
    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
    {
        CGRect adFrame;
        adFrame.size = CGSizeMake(728,90);
        
        inMobiView = [[IMAdView alloc]
                      initWithFrame:adFrame
                      imAppId:[self siteId]
                      imAdUnit:IM_UNIT_728x90
                      rootViewController:[self rootViewControllerForAd]];
        
        
        
    } else {
        
        inMobiView = [[IMAdView alloc]
                                initWithFrame:kAdWhirlViewDefaultFrame
                                imAppId:[self siteId]
                                imAdUnit:IM_UNIT_320x50
                                rootViewController:[self rootViewControllerForAd]];
    }

  inMobiView.refreshInterval = REFRESH_INTERVAL_OFF;
  inMobiView.delegate = self;
  self.adNetworkView = [inMobiView autorelease];

Can you see what I am doing wrong?

Thank you very much for your help.

Greetings

Anselm

Community
  • 1
  • 1
Anselm Scholz
  • 478
  • 9
  • 20

1 Answers1

3

Since you've turned "off" the refresh interval, IMAdView does not load ad requests by itself. As per the InMobi & AdWhirl documentation, you just need to add one more line before calling autorelease on inmobiView:

[inmobiView loadIMAdRequest]; Calling this method will trigger an ad-request immediately, and you can also pass additional parameters by passing an optional IMAdRequest instance.

IMAdRequest *request = [IMAdRequest request]; //assign optional parameters if required. . . . [inmobiView loadIMAdRequest:request];

rishabh
  • 1,155
  • 1
  • 10
  • 17
  • Thank you! for your help, InMobi only sends 320x50 test ads, as they tell me... so I can't see the scaled result... It now seems to work. – Anselm Scholz Jun 19 '12 at 14:54
  • Hmm.. probably remove the installed app from the simulator when you switch between iPad Simulator <-> iPhone Simulator. – rishabh Jun 20 '12 at 09:04