How to show chartboost ads if revmob fails to show up? - iphone

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.

Related

How to run local notification using revmob

Revmob is working fine in my app,but i want to send local notification using revmob
[[RevMobAds session] scheduleLocalNotification];
// in your AppDelegate.m
(void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
[[RevMobAds session] processLocalNotification:notification];
}
This is the code i am using,but after that it is not running,there is something wrong with my code,i guess,please help
As described in the RevMob site, the scheduleLocalNotification method scheduled a notifications at a time which RevMob expects to be the best. Yesterday this time was around 5:30pm (local time), but they can change it if they think is necessary.
If you want to test the local notification in a specific time you can use the scheduleLocalNotification: method.

RevMob top banner doesn't hide iphone sdk

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

Facebook API not calling delegate(request) methods if device having Facebook App

In my app am using Facebook api and in my device am having Facebook app(FBApp) also.
In my app i provided a button to login when we click on button it is opening FBApp login screen and after that it is coming to my app.
Here the following methods are not firing
-(void)request:(FBRequest *)request didReceiveResponse:(NSURLResponse *)response
-(void)request:(FBRequest *)request didLoad:(id)result
This is the button action
- (IBAction)LoginOrLogout
{
// If the user is not connected (logged in) then connect. Otherwise logout.
if (!isConnected)
{
[messageTextField setHidden:NO];
[facebook authorize:permissions];
// Change the lblUser label's message.
**[lblUser setText:#"Please wait..."];** //struck here only not firing delegate response methods above
}
else
{
[facebook logout:self];
[messageTextField setHidden:YES];
[lblUser setText:#"Tap on the Login to connect to Facebook"];
}
isConnected = !isConnected;
[self setLoginButtonImage];
}
Without FBApp it is calling delegate methods successfully.How can we solve this.
Any one can help or suggest.
Actually when you tap on authorize then it will open safari or if there is facebook app on device then it will open facebook app otherwise it will open facebook in safari. If you don't want to open the safari and facebook app then in facebook.m change this statement everywhere where it is calling to NO.
[self authorizeWithFBAppAuth:NO safariAuth:NO];
I was only able to receive those notifications on the AppDelegate class. I tried to create an util class that could be plugged in every project so it could help people using the Facebook API. The problem is that even tho I set the delegate to my util class, the delegate's methods were never called. Try to put then on the AppDelegate..

AdWhirl integration problem in iPhone app

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;
}

How to show AdMob ads in real iPhone device?

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;
}