1

I tried using the js script for inmobi on my phonegap (2.8.0) app but it failed when i clicked on the ad. I contacted inmobi and they told me to use the ios sdk code. I have implemented this but the ad covers the top of my screen. I am no object c developer and i am at a loose end. This is the code i used to put the ads onto my screen. Does any one know how i can change the code to fit it at the top of the screen and then my app underneath.

This is from my MainViewController.m

    - (void)webViewDidFinishLoad:(UIWebView*)theWebView
{
    // Black base color for background matches the native apps


    inmobiAdView = [[IMAdView alloc] initWithFrame:CGRectMake(0, 0, 320, 50) imAppId:INMOBI_APP_ID imAdSize:IM_UNIT_320x50];
    //  inmobiAdView.delegate = self;

    IMAdRequest *request = [IMAdRequest request];
    /**
     * additional targeting parameters. these are optional
     */
    request.gender = kIMGenderMale;
    request.education = kIMEducationBachelorsDegree;
    // etc ..
    inmobiAdView.imAdRequest = request;
    [self.view addSubview:inmobiAdView];
    [inmobiAdView loadIMAdRequest];
  return [super webViewDidFinishLoad:theWebView];
}

I found this but this is for a different banner system

enter link description here

Sohan
  • 1,287
  • 1
  • 15
  • 29
Steven Kinnear
  • 412
  • 3
  • 19

0 Answers0