I have to implement AdWhirl in my app. It works fine - I'm getting ads from AdMob and iAd now.
There is no ad coming from AdMod and iAd. I am getting an error in the console. I can provide the code I'm using if it'd be helpful.
Try by implementing this delegate...
- (UIViewController *)viewControllerForPresentingModalView
{
return yourAPP.viewController;
}
Related
I am running revmob in my app but revmob fails to appear in many countries.I want to show the chartboost ads if revmob fails to appear..
kindly help me in applying chartboost if revmob fails
You can use ads delegates for this, for example, to show an fullscreen:
RevMobFullscreen *fs = [[RevMobAds session] fullscreen];
fs.delegate = self;
[fs showAd];
An then call the chartboost ad in the delegate method:
- (void)revmobAdDidFailWithError:(NSError *)error {
NSLog(#"Ad failed: %#", error);
// Code to show a chartboost ad
}
They have an working example that came with the SDK.
I'm implementing iAd in my app using the paradigms for a multi-VC app that apple demonstrates in their sample code (e.g. TabbedBanner and NavigationBanner). If you're not familiar with it, the paradigm is essentially to have the main app delegate serve as the primary AdBannerViewDelegate, and share the banner view across your respective view controllers.
My ads are appearing fine throughout the app, without any warnings. The problem is that for some reason when I click an ad banner, it doesn't navigate the appearance of the ad (should slide up from the bottom). There's just a delay and then the ad appears. But when I dismiss the ad it animates fine.
The appearance animates fine in apple's sample code, so the problem lies somewhere in my code. I'm just not sure where because I haven't changed much in the iAd implementation. My bannerViewActionShouldBegin is just
- (BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave
{
[[NSNotificationCenter defaultCenter] postNotificationName:BannerViewActionWillBegin object:self];
return YES;
}
But I don't think the problem lies in the NotificationCenter, because if I comment out that bit and just do
- (BOOL)bannerViewActionShouldBegin:(ADBannerView *)banner willLeaveApplication:(BOOL)willLeave
{
return YES;
}
The problem remains.
Any ideas? I can post more code, but my digging around in the documentation hasn't revealed anything that would flip an animated BOOL for ad presentation.
Thanks in advance.
FWIW, the best I could figure is that this seems to simply be an iOS version issue. In 4.0 it fails to animate. In 5.0 it animates.
In my apps i'm used RevMob sdk for advertisement. In First view advertisement banner is shown using this code.
[RevMobAds showBannerAdWithAppID:#"xxxxxxxxxxxxxx"];
And in second view i'm hide the banner using the code..
[RevMobAds hideBannerAdWithAppID:#"xxxxxxxxxxxxxxxxxxx"];
This code run perfectly banner is shown in first view and hide in another view.
But my problem is this when i'm writing code to show popup in appilicationdidbecomeactivemethod:
- (void)applicationDidBecomeActive:(UIApplication *)application
{
[RevMobAds showPopupAdWithAppID:#"xxxxxxxxxxxxx"];
}
Then in second view bannerAdd is not hide it will still appear in the second view.
I'm not able to realize what is the problem. if u have any suggestion plz help me...
Thanks in advance.
The methods that you are using are deprecated, you should use:
[RevMobAds showBannerAd];
[RevMobAds hideBannerAd];
[RevMobAds showPopup];
You can see more on the api documentation:
http://sdk.revmob.com/ios-api/index.html
i have configure adwhirl in my app but add's are not displayed is there any configuration needed in apple account for iad ? if needed any settings for iad in apple account then please guide me and also tell me how to configure that settings in adwhirl.
To use AdWhirl in ur application , you need to register here :
https://www.adwhirl.com/home/register
From here you'll get a unique key.Download the API for Adwhirl and then integrate the key to it.The Adwhirl manages iAd, admob etc. percentage wise.When one fails to load , the adwhirl loads the another.
you can refer this link also :
http://www.raywenderlich.com/5350/how-to-integrate-adwhirl-into-a-cocos2d-game
You might want to consider using the new Admob mediation instead as I believe adwhirl will soon become unsupported as they are concentrating on AdMob now (both owned by google).
Refer this to integrate adwhirl for iad and other ads.
Add iad account on adwhirl account of yours by loging to adwhirl
Download latest AdwhirlAPI and add to your project. Refer Api and setup links
In .h of yourcontroller
#interface yourController : <AdWhirlDelegate>
Now Do following things in .m file where u wnat adwhirl:
1) DefineAdwhirlKey
#define kSampleAppKey #"your adwhirl key"
2) Add code in viewDidLoad
AdWhirlView *awView = [AdWhirlView requestAdWhirlViewWithDelegate:self];
[awView setFrame:CGRectMake(0,326,320,50)];//set your frame
[awView setDelegate:self];
[self.view addSubview:awView];
3) Add AdwhirlDelegate methods
- (NSString *)adWhirlApplicationKey
{
return kSampleAppKey;
}
- (UIViewController *)viewControllerForPresentingModalView
{
return self;
}
I want to integrate AdMob ads in my iPhone app. I'm using IB way to add the view and follow AdMob's pdf guide:
1. Add AdMob group(AdMobView.h,AdMobDelegateProtocol.h,libAdMob.a)
2. Add required frameworks(AudioToolbox,MediaPlayer,MessageUI,QuartzCore)
3. Add TouchJSON group
4. Add IBSupport group(AdViewController.h,AdViewController.m)
5. Add a 320*48 UIView in IB, add NSObject and change its class to AdViewController,
link AdViewController's view to the 320*48 UIView and link AdViewController's viewController to current view controller.
Now the iPhone simulator can show ads from AdMob, but when I test it on real device, I get the error "AdMob: Did fail to receive ad".
I've tried to add test device's UDID to testDevices array, but still get the same error.
- (NSArray *)testDevices {
return [NSArray arrayWithObjects: ADMOB_SIMULATOR_ID, DEVICE_UDID, nil];
}
Is there any problem in the above steps? Does anybody know why can't I get the ads in real device? By the way, what should be changed to build for real for-sale app, not just for test?
Setting testDevices seems not working for my test device. I've added a deprecated method -(BOOL)useTestAd according to AdMob wiki and it works now.
- (BOOL)useTestAd {
return NO;
}