Implementing Google AdMob to UIWebview app

Discussion in 'iOS Programming' started by nightwalker21, May 18, 2014.

  1. nightwalker21 macrumors newbie

    nightwalker21

    Joined:
    Jul 27, 2011
    Location:
    USA
    #1
    I'm trying to learn the best way of implementing Google's AdMob to my app I did it once but wasn't sure it was the right way so I'm trying to make sure it is. I would just like to know where in this line of code do I need to put the code for Google AdMob?

    Here is what I am working with:
    Code:
    //  D3@TH's Creations
    //
    //  Created by D3@TH on 5/16/14.
    //  Copyright (c) 2014 D3@TH. All rights reserved.
    //
    
    #import "ViewController.h"
    
    @interface ViewController ()
    
    @end
    
    @implementation ViewController
    
    - (void)viewDidLoad {
        [super viewDidLoad];
        NSString *fullURL = @"http://sample.com";
        NSURL *url = [NSURL URLWithString:fullURL];
        NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
        [_viewWeb loadRequest:requestObj];
    }
    
    - (void)didReceiveMemoryWarning
    {
        [super didReceiveMemoryWarning];
        // Dispose of any resources that can be recreated.
    }
    
    @end
    Just to let some people know so they don't get confused sample.com is not my site I removed my site because of advertising rules. I'm also making a Tab Bar WebView app.
     
  2. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #2
    Didn't Google stop serving AdMob ads a few years ago? I thought they sent me an email telling me that they'd stopped it in favor of a newer ad service (which I didn't bother looking into, because I'd already stopped using AdMob before I got the email from Google).
     
  3. nightwalker21 thread starter macrumors newbie

    nightwalker21

    Joined:
    Jul 27, 2011
    Location:
    USA
    #3
    Then what would be a good site to use ads on my app? Besides Apples iAd?

     
  4. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #4
    AdMob is still available, it's just kind of called "Google Mobile Ads" now. Note that even this page mentions AdMob.
     
  5. nightwalker21 thread starter macrumors newbie

    nightwalker21

    Joined:
    Jul 27, 2011
    Location:
    USA
    #5
    I've got the latest version of AdMob I just need to know where exactly I put the code on the ViewController?

     
  6. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #6
    Have you looked at the Google Mobile Ads iOS SDK's sample applications?
     

Share This Page