Discussion Forums  >  Xcode, Errors, Installing, Configuring

Replies: 16    Views: 109

Jlentriken
Aspiring developer
Profile
Posts: 246
Reg: Dec 26, 2012
Palm Beach, Gol...
12,110
03/06/14 06:57 AM (10 years ago)

Ad Mob SDK Integration

Is there a guide out there on using google admob in an iOS app with buzz touch? -Jeremy
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
03/06/14 10:34 AM (10 years ago)
At present there is no Admob integration guide for ios apps as far as i know. But, i have intergated it in some plugins in couple of my apps following the steps in the below links together. https://developers.google.com/mobile-ads-sdk/docs/#ios https://developers.google.com/mobile-ads-sdk/docs/admob/fundamentals#ios https://developers.google.com/mobile-ads-sdk/docs/admob/intermediate#ios Try it yourself and inform whether it works for you. BTW which particular plugin you want the ads in?
 
Jlentriken
Aspiring developer
Profile
Posts: 246
Reg: Dec 26, 2012
Palm Beach, Gol...
12,110
like
03/06/14 10:43 AM (10 years ago)
I want it in a custom URL plugin. I will give it a go and post whether or my it works for me. Thanks! Jeremy
 
Jlentriken
Aspiring developer
Profile
Posts: 246
Reg: Dec 26, 2012
Palm Beach, Gol...
12,110
like
03/06/14 10:45 AM (10 years ago)
-Silly question. When following the steps to put in the code, do indo it in the respective plugins files? Jeremy
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
03/06/14 10:46 AM (10 years ago)
It should work. If you follow the above links, it will get you the banner ads at the top of the screen. In case you want them at the bottom of screen, you will have to add few lines more. I will post them when i am on my dev machine.
 
Jlentriken
Aspiring developer
Profile
Posts: 246
Reg: Dec 26, 2012
Palm Beach, Gol...
12,110
like
03/06/14 10:47 AM (10 years ago)
Yeah I want them at the bottom. Thanks!! Jeremy
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
03/06/14 10:47 AM (10 years ago)
Yes you have to put the codes in respective .h and .m plugin files.
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
03/06/14 10:48 AM (10 years ago)
I will paste the code in the morning for having the banner ads at the bottom. Its already midnight here.
 
Jlentriken
Aspiring developer
Profile
Posts: 246
Reg: Dec 26, 2012
Palm Beach, Gol...
12,110
like
03/06/14 10:49 AM (10 years ago)
Almost 4 am for me. Woke up too early today! Cheers Jeremy
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
03/06/14 10:51 AM (10 years ago)
Brisbane? Wow! Nice to meet you. :)
 
Jlentriken
Aspiring developer
Profile
Posts: 246
Reg: Dec 26, 2012
Palm Beach, Gol...
12,110
like
03/06/14 10:53 AM (10 years ago)
Yeah, Gold Coast. You too :). Well I best get back to working. I'll catch up with you tomorrow morning. Cheers, Jeremy
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
03/06/14 09:56 PM (10 years ago)
Since you want ads to be displayed in the custom url plugin screen the following is step by step tutorial to add admob ads in your project. Steps to integrate admob in ios bt apps- Part 1--- (This part is common for all of your ios project) 1. Add files to your project as shown in the step 1 and 2 in the following link- https://developers.google.com/mobile-ads-sdk/docs/#ios 2. Add following references to your project- AdSupport AudioToolbox AVFoundation CoreGraphics CoreTelephony MessageUI StoreKit SystemConfiguration 3. Add -ObjC to the Other Linker Flags of your application target's build setting. Part 2--- (Changes in .h file) 1. In your BT_screen_customURL.h file import the following- #import "GADBannerView.h" 2. In the BT_screen_customURL.h file add following code in the @interface somewhere at line no- 45 or 46 --- GADBannerView *bannerView_; Part 3--- (Changes in .m file) 1. In your BT_screen_customURL.m file add following code in the viewDidLoad method. You will find it at line no 50. Add following code at line no 54--- bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner]; bannerView_.adUnitID = @"YOUR_ADMOB_APP_ID_GOES_HERE"; bannerView_.rootViewController = self; [self.view addSubview:bannerView_]; [bannerView_ loadRequest:[GADRequest request]]; NOTE: Replace ---YOUR_ADMOB_APP_ID_GOES_HERE---- with your admob app id. Then clean- build your app and run it. You will get ads on top of the screen. 2. In case if you want your ads to be served at bottom add following code instead of above code at line no 54--- CGPoint origin = CGPointMake(0.0, self.view.frame.size.height - CGSizeFromGADAdSize(kGADAdSizeBanner).height); bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner origin:origin]; bannerView_.adUnitID = @"YOUR_ADMOB_APP_ID_GOES_HERE"; bannerView_.rootViewController = self; [self.view addSubview:bannerView_]; // Initiate a generic request to load it with an ad. [bannerView_ loadRequest:[GADRequest request]]; NOTE: Replace ---YOUR_ADMOB_APP_ID_GOES_HERE---- with your admob app id. Then clean- build your app and run it. You will get ads at bottom of the screen.
 
Jlentriken
Aspiring developer
Profile
Posts: 246
Reg: Dec 26, 2012
Palm Beach, Gol...
12,110
like
03/08/14 03:56 AM (10 years ago)
Worked perfectly, thank you! Jeremy
 
RonBo
buzztouch Evangelist
Profile
Posts: 167
Reg: Feb 26, 2012
Raleigh, NC
5,220
like
03/09/14 10:05 AM (10 years ago)
I got the example working, but if I want to serve up different series of AdMob ads for different Custom URL screens, how do I do that? Seems like I'd need to personalize this for each AdMod AppID I need, or wrap it in a If/Then logic? bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner origin:origin]; bannerView_.adUnitID = @"YOUR_ADMOB_APP_ID_GOES_HERE"; bannerView_.rootViewController = self; [self.view addSubview:bannerView_]; // Initiate a generic request to load it with an ad. [bannerView_ loadRequest:[GADRequest request]];
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
03/09/14 10:13 AM (10 years ago)
I dont understand why you want different series of admob ads for different custom url screens when the ads will be automatically refreshed after 120 seconds. Other than that you can also set the refresh rate to any amount of seconds in your admob dashboard through manage settings option of particular app. BTW i am not sure how to personalise the code in case you still decide to go up with coding it. Sort of still new to ios thing.
 
RonBo
buzztouch Evangelist
Profile
Posts: 167
Reg: Feb 26, 2012
Raleigh, NC
5,220
like
03/09/14 05:47 PM (10 years ago)
I'm using AdMob to deliver personalized house ads that I control. An easy way to think of this is have a series of simple menus in your app. My first two menus deal with hunting and one with fishing. By selling, and displaying different ads on each menu I am able to target ads to the areas of the app that people are interested in.
 
Jlentriken
Aspiring developer
Profile
Posts: 246
Reg: Dec 26, 2012
Palm Beach, Gol...
12,110
like
03/09/14 05:57 PM (10 years ago)
Just an idea, but would it be easier to display the one lot of ads you control through ad mob, and then use scringos as network for the other ads? Jeremy.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.