PDA

View Full Version : iAd and Admob mediation help.




Ernie11
May 7, 2014, 05:38 PM
Hello everyone. I uploaded an app using the Admob mediation system and it got rejected because something was wrong with the advertisment part. I dont understand what I did wrong and would like if someone could point me in the right direction. I cant put the whole review on here so I will just put the top part which should be enough to give you an idea of where im at. After doing the guide on Admobs about how to setup the mediation I just added the iAd framework (since I want iAds first then Admobs) and thats it. Was I suppost to do something else for the iAd to work? On the simulater I see both iAd ads and Admob ads so im a little confused. Thanks.

We found your app uses the iOS Advertising Identifier but does not include ad functionality.



Ernie11
May 7, 2014, 09:01 PM
Thought I should say what I did when I did the mediation. Maybe I did something wrong of didnt do something I was suppost to.



I downloaded the Admob SDK and added all the files except for the readme. Then I downloaded the iAd adaptor from their site aswell and added the file too, except for the readmes. Then I loaded all the frameworks they asked for which are: AdSupport, AudioToolbox, AVFoundation, CoreGraphics (already was there), CoreTelephony, MessageUI, StoreKit, and SystemConfiguration. I set the "Other Linker Flags" to -ObjC. Then I added this code to where ever I wanted the ads.

In the .h.

#import "GADBannerView.h"

and after the @interface.

{
GADBannerView *bannerView_;
}

In the viewDidLoad of the .m.

bannerView_ = [[GADBannerView alloc] initWithFrame:CGRectMake(0, 405, 320, 50)];
bannerView_.adUnitID = @"(deleted my ad ID)";
bannerView_.rootViewController = self;
[self.view addSubview:bannerView_];
[bannerView_ loadRequest:[GADRequest request]];


Then I added the iAd framework and thats it. Am I suppost to do something extra with the iAd part? Could this be the problem? Do I have to put #import <iAd/iAd.h> in my .h files? The part of the identifiers on the Admob files that I could find is this:

// Genders to help deliver more relevant ads.
typedef NS_ENUM(NSInteger, GADGender) {
kGADGenderUnknown, ///< Unknown gender.
kGADGenderMale, ///< Male gender.
kGADGenderFemale ///< Female gender.
};

Hope this helps in helping me. Thanks.