AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
02/22/15 02:57 PM (9 years ago)

Admob 7 sdk with Xcode 5.1

Google admob sdk is now a framework and it is meant to be installed in a different way. I currently use Admob 6.12.2 quite happily but I thought it would be better to go with 7.0 as it has just come out (3rd Feb). It must be an installation problem but I cannot see what I am doing wrong. I've looked at Stackoverflow, scoured Google, followed all the suggestions where people have the same problem but I can't get it to work. Has anyone here tried it?
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
05/05/15 02:14 AM (9 years ago)
Did you figure this out? I'm back using IOS after a while and my projects used 6.12.2 as well. I have not found a solution. I keep getting errors no matter what. I'll keep at it.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
05/05/15 02:57 AM (9 years ago)
I have admob all working with 6.12.2, but I never did figure it out for ver 7. I haven't looked at it for a couple of months. If you get it going, let me know! Alan
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
05/05/15 03:03 AM (9 years ago)
I have it working!! This should get you going ;) .h @import GoogleMobileAds; BT_viewController <UIAlertViewDelegate> { GADBannerView *bannerView_; } .m @import GoogleMobileAds; if([[BT_strings getJsonPropertyValue:self.screenData.jsonVars nameOfProperty:@"includeAds" defaultValue:@"1"] isEqualToString:@"1"]){ if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) { if([UIScreen mainScreen].bounds.size.height == 568.0) // NSLog(@"Google Mobile Ads SDK version: %@", [GADRequest sdkVersion]); bannerView_ = [[GADBannerView alloc] initWithFrame:CGRectMake(0.0, self.view.frame.size.height - GAD_SIZE_320x50.height, GAD_SIZE_320x50.width, GAD_SIZE_320x50.height)]; bannerView_.adUnitID = @"ca-app-pub-222222222/2222222"; bannerView_.rootViewController = self; [self.view addSubview:bannerView_]; GADRequest *request = [GADRequest request]; request.testDevices = @[ @"22244434442222222"]; [bannerView_ loadRequest:[GADRequest request]]; } else { [self createAdBannerView]; } }
 

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.