The Monetization features of Appsfire SDK allows you to:

  • Display ads in your application
    • Interstitial ads
      • A full-screen native ad unit for iPhone & iPad, we call it the Sushi.
      • A full-screen native ad unit that occurs outside the view of your app, resembling the iOS 7 Task Manager, we call it Uramaki.
    • In-stream native ads
      • An in-stream native ad unit which allows you to deeply integrate our ads in your application's design, we call it Sashimi. We provide templates for this ad unit, but you can create your own custom formats (note: custom ad units will be reviewed by our team).
      • A custom pull-to-refresh control which displays an ad during the refresh process, we call it Udon Noodle.
    • Native ads
      • Get the metadata of the ad without the views stuff!

Import header files

To use the monetization SDK, you'll need to import both Base and Monetization header files.

#import "AppsfireSDK.h"
#import "AppsfireAdSDK.h"

Initializing the SDK

Initialize the SDK by calling the +connectWithAppId:appId:parameters: method inside your application:didFinishLaunchingWithOptions: function.

For a more complete overview of the features available, please refer to the dedicated section.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    // [...]

    // connect to appsfire services
    [AppsfireSDK connectWithAppId:@"YOUR_APP_ID" parameters:nil];

    return YES;

}

Enable 'debug' mode when testing

In order to implement the monetization SDK easily, we recommend you to enable the debug mode thanks to +setDebugModeEnabled:. It'll allow you to see a dummy ad each time you need it.

To avoid forgetting it when you submit your app to iTunes, we advise you to wrap the line with a preprocessor condition (#ifdef DEBUG [...] #endif).
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    // [...]

    // connect to appsfire services
    [AppsfireSDK connectWithAppId:@"YOUR_APP_ID" parameters:nil];

    // here you can use the debug mode
    // it’ll allow you to see an ad whatever the situation
    // do not ship a build with this debug mode enabled!
    #ifdef DEBUG
        [AppsfireAdSDK setDebugModeEnabled:YES];
    #endif

    return YES;

}