0

I m using RevMobAds first time in my app using this code:

[RevMobAds startSessionWithAppID:@" "];
[RevMobAds session].testingMode = RevMobAdsTestingModeWithAds;
[[RevMobAds session]hideBanner];

RevMobBannerView  ad = [[RevMobAds session] bannerView];

ad.delegate = self;
[ad loadAd];
ad.frame=CGRectMake(00, 430, 320, 50);

[self.view addSubview:ad];`

The problem is this no add is showing in the banner.Please help me.

1 Answers1

4

Please try like this :

Step:1 Add RevMovAds.framework.

Step:2 In AppDelegate Method import #import <RevMobAds/RevMobAds.h>

Step:3 Add Delegate Method "RevMobAdsDelegate"

Step:4 Define #define REVMOB_ID @"52f073fa09e95bbb02000761" in Prefix.pch

(Create a account on RevMobAds site & get REVMOB_ID for your Application)

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  [RevMobAds startSessionWithAppID:REVMOB_ID];
  return YES;
}

Step:5 Declare the method

-(void)ForshowingFullScreenAds
{
   RevMobFullscreen *fullscreen = [[RevMobAds session] fullscreen];
   fullscreen.delegate = self;
   [fullscreen loadAd];
   [fullscreen showAd];
}

Step:6 RevMobAdsDelegate methods

- (void)revmobAdDidReceive 
{
   NSLog(@"[RevMob Sample App] Ad loaded.");
}

- (void)revmobAdDidFailWithError:(NSError *)error
{
   NSLog(@"[RevMob Sample App] Ad failed: %@", error);
}

- (void)revmobAdDisplayed {
   NSLog(@"[RevMob Sample App] Ad displayed.");
}

- (void)revmobUserClosedTheAd {
   NSLog(@"[RevMob Sample App] User clicked in the close button.");
}

- (void)revmobUserClickedInTheAd {
   NSLog(@"[RevMob Sample App] User clicked in the Ad.");
}

- (void)installDidReceive {
   NSLog(@"[RevMob Sample App] Install did receive.");
}

- (void)installDidFail {
   NSLog(@"[RevMob Sample App] Install did fail.");
}

Step:7 Import AppDelegate Method

Step:8 Call this Ads in -(void)ViewDidLoad

  AppController *App = (AppController *)[UIApplication sharedApplication].delegate;
  [App ForshowingFullScreenAds];
Soumya Ranjan
  • 4,817
  • 2
  • 26
  • 51