Configuration via Xcode

Drag and drop the directory RevMobAds.framework inside one file group of your project on XCode (usually, "Frameworks"). After dropping the directory into Xcode, the following window will appear: be sure to check the box for "Copy items into destination group's folder (if needed)".

Then, be sure that RevMob framework can be seen inside one of the project groups of your project.

Do not forget to include the frameworks SystemConfiguration.framework, StoreKit.framework, MediaPlayer.framework and AdSupport.framework that are not included by default. You can do that by clicking in the project root > Build Phases > Link Binary With Libraries > Click in the + button.

To use the RevMobAds.framework, just import it (in .h or .m files) in every class you want to use it:

#import <RevMobAds/RevMobAds.h>

Configuration for Swift language

Add an Objective-C file to your Swift project

You will be prompted if you want a bridging-header. Press YES.

Xcode adds a .m and .h files. Feel free to delete the .m one.

Double-check in your project's Build Settings if the Objective-C Bridging-Header file was properly set and if Defines Module is set to YES.

Finally, add the following line in your bridging header (.h)

#import <RevMobAds/RevMobAds.h>

Configuration via CocoaPods (Alternative)

Add our official pod as a dependency in your project's Podfile:

dependency 'RevMob'

Run on terminal:

pod install

Start Session

Before showing any ads, you must start a RevMob session.

To start a RevMob session just call the startSession: method in the beginning of the application:didFinishLaunchingWithOptions: of your AppDelegate.

Testing Mode

While you are developing your app, you will probably want to test two scenarios:

RevMob SDK shows you an advertisement successfully;

RevMob SDK does not deliver an advertisement for any reason.

By activating Testing Mode you can reproduce these two scenarios easily and do not need to worry about statistics, since the impressions/clicks/installs will not be counted while it is 'on'.

You can turn it on/off whenever you want through the Edit Media page (in your 'Monetization' tab, click on the Edit button of the App you want to test).

Remember to turn it off in order to start Monetizing!

Rewarded Video

Only supported by SDK version 9 or later.

Rewarded Videos are a great way to monetize interacting with your user. The most common way to display them is by showing a pre-roll text box inviting them to watch the ad and then a post-roll text box letting them know they earned the reward. We designed 7 amazing pre-roll and post-roll boxes for you to use. You can activate and personalize them through our console. If you don't want to use them, you can also use yours.

For rewarded ads to work properly, you must load them before trying to call theshowRewardedVideo method:

Fullscreen

With SDK 9 our fullscreen ad unit can show either an interstitial or a video ad. It will always return the best campaign for your app. This will only happen though if you call loadFullscreen and then the showFullscreen method after the RevMobAdReceived listener is called.

If you want to display only interstitial ads in your app, uncheck “Accepts Video” in the “ad units-actions”.

As you can notice, the syntax changes between both languages, but Xcode 6 is able to work with them side-by-side.

We offer the parallax effect for fullscreen in iOS 7. The parallax effect is always disabled, unless you enable it using our default mode (your app can be seen behind the fullscreen) or background mode (there is a black background in the fullscreen, which prevents your app to be seen).

You can also change the size and location of the banner, just check the example in the API docs.

Below, you can see a video showing how to implement the banner ad unit.

Link

Use the Link to redirect the user to the advertised mobile application download page.
A common usage is to associate the link to a "more games" button or to a custom banner.
Be sure you are using listeners to check if the link was loaded successfully, otherwise you create a workaround for this situation, like hide the button.

Button

This ad unit is a button properly configured to offer more free apps to your users. In other words, it is a UIButton that uses the RevMob Ad Link internally. You can use the same strategy if you want a more customizable button.

In your UIViewController implementation (.m files) call the method button or one of its variations. A good place to do this is in the viewDidLoad method.

Popup

Popup is the simplest ad unit. We recommend it only for apps that will be intensively used by old devices with a slow internet connection.
For all the other cases, we recommend you to use the fullscreen or video ad unit.

In your Delegate or UIViewController implementation (.m files) call the method showPopup. A good place to do this is in applicationDidBecomeActive or viewDidLoad: method.

Listeners - Delegates

With Listeners (also known as Delegates or Callbacks) you can follow the ad workflow. The RevMob SDK will fire events for every important change in the ad state.
For example, you can identify if the ad was loaded successfully or if the user clicked on the ad.

There are two ways to get notifications about the ad, the recommended one is the use of completion blocks and the alternative is delegates. Both of them are available only through the use of objects not the facade, more info about the objects look at the API documentation. Here is a example of a fullscreen using completion blocks:

RevMobFullscreen*ad=[[RevMobAdssession]fullscreen];// you must retain this objectad.delegate=self;[adshowAd];

You can create a delegate for each ad unit request or you can create a shared delegate that will be used by many ad units.
To use a delegate you must implement the protocol RevMobAdsDelegate in your AppDelegate or UIViewController.

Placement IDs

Placement ID is an optional feature recommended for experient publishers.
If you want to enable/disable specific ad units in real time, or, if you want to have an exclusive tracking for an ad unit, you must use Placement IDs (do not confuse with Media ID).
First of all, you need to create one or more Placement IDs (for each ad unit) in the RevMob Console.
Then copy the corresponding ID, and pass it through the ad method calls.

5.2.1 (2012/11/30)

5.2.0 (2012/11/27)

readLocalNotification methods was renamed to processLocalNotification.

The SDK automatically process a local notification if the application is not running.

5.1.2 (2012/11/22)

The Local Notification Ad is now scheduled immediately.

5.1.0 (2012/11/21)

Better log messages.

Fullscreen load with blocks handlers.

Internal improvements on Fullscreen.

Fixed a bug that can cause a crash when releasing the fullscreen.

5.0.2 (2012/11/09)

Some internal improvements in Local Notification ad unit.

5.0.1 (2012/11/09)

Removing methods "isLoaded" from ad units.

5.0.0 (2012/11/05)

New and better public methods.

Local Notification ad unit.

Better log messages.

Removing old and deprecated public methods.

Better memory management.

4.6.2 (2012/10/23)

Corrected a bug that can eventually cause a crash

4.6.0 (2012/10/16)

Support to armv6 in adition to armv7 and arm7s

Added support to identifierForAdvertising (It's necessary to include AdSupport.framework)

Improvments on log messages

Corrected a bug that cause link errors when used Xcode 4.4 and earlier.

4.5.2 (2012/10/05)

Fixed a bug on fullscreen that can cause a crash

4.5.1 (2012/10/05)

Fixed a bug that allowed a popup without message

AdLink an ButtonAd call RevMobAdDidRecive on delagate

Fixed a bug on Banner that cause a wrong positioning

Memory management improvments on ads

4.5.0 (2012/09/28)

App Store now open inside the app when available (Now it's necessary to include StoreKit.framework)

Added a method to access the shared instance of the RevMobAds object

Instance methods to show ads

General memory management improvments on ads

4.4.0 (2012/09/25)

Support to armv7s

4.3.0 (2012/09/19)

Ads with placements

Improved log messages

Facade methods from loadedFullscreen merged with Fullscreen methods

4.2.0 (2012/09/17)

Support for iOS 6 (only armv7)

Dropped support for versions of iOS erlier than 4.3

4.1.2 (2012/09/11)

The fullscreen image was squished in some special scenarios when using an iOS lower than 6.

4.1.1 (2012/09/11)

Initial rotation restrictions

4.1.0 (2012/09/05)

Testing mode

Delegates for AdLink and ButtonAd

Clear log messages

4.0.0 (2012/08/30)

Alternative to facade methods, option to use ads with object oriented design

RevMobBannerView

Memory management on ads

3.1.0 (2012/08/22)

Improvements on Fullscreen

Memory management

Improvements on network connection management

3.0.2 (2012/08/14)

Improvements in view hierarchy of banner.

3.0.1 (2012/08/08)

Added a method to facilitate the bug report.

Fixed some bugs that cause incompatibility with iOS older than 4.0.

3.0.0 (2012/08/02)

Introducion of the session concept, method [RevMobAds startSession:AppId] is mandatory. It is important to increase the eCPM.
Incompatibility note: The Media Ids must be include only in the startSession method. The old of Fullscreen, Banner, Button, AdLink and Popup methods are deprecated and must not be used anymore, look in the documentation for it's substitutes.

Improvements on the Popup.

Improvements on memory management.

http://www.youtube.com/embed/bYllnBtBHcs?rel=0

2.1.0 (2012/07/27)

Added Button Ad.

Improvements on the example application.

2.0.8 (2012/07/26)

Fixed an issue on load and relase of Fullscreen.

2.0.7 (2012/07/25)

Improvements on Fullscreen and Banner.

Library size reduction.

2.0.6 (2012/07/18)

Removed some API not used on iOS 5.

2.0.5 (2012/07/17)

Fixed an issue on multiple load and show of Fullscreen.

Fixed an issue when Fullscreen load returned an error on the first load.

2.0.4 (2012/07/13)

Banner auto refresh itself in case the user click in it and go back to the application.

2.0.3 (2012/07/12)

Fixed Fullscreen with pre-load close button problem.

2.0.2 (2012/07/12)

Fullscreen with pre-load may be displayed again if the user clicked in the close button.

Banner does not appear behind the status bar when it is loaded after the Fullscreen ad.

Better memory management for fullscreen and banner.

2.0.1 (2012/07/10)

Option to deactivate the banner.

Option to override the delegate in the show fullscreen method with pre-load.

Banner is deactivated when the user clicks in it.

SDK is now compatible with iOS 6.

2.0.0 (2012/07/06)

RevMob iOS-SDK is now a Objective-C framework.

New methods in the facade to customize Fullscreen and Banner for specific orientations.

Added delegate methods to listen when the user click in the Yes and No buttons of the Popup.