AppKit Native Integration

Native ads let you easily monetize your app in a way that's consistent with its existing design. The Instal SDK execute the download and do all the tracking automatically.

Instal Publisher SDK Integration

Prerequisites

Before integrating interstitial ads in your app, you’ll need to go through the steps in our Getting Started Guide to integrate the SDK into your project.

To make a request you'll need AdUnitIdentifier that you can find in your panel.

Integration

You need to import following header files from Instal SDK

#import "INNativeDiscoveryRequest.h"
#import "INNativeAd.h"
#import "INNativeAdDelegate.h"

Your view controller must implement INNativeAdDelegate

@interface MyViewController () <INNativeAdDelegate>
@property (strong, nonatomic) NSArray *ads;
@end

#pragma mark - INNativeAdDelegate
- (UIViewController *)viewControllerForPresentingModalView {
    return self;
}

To load ads make new request passing you AdUnitIdentifier, you need to iterate through INNativeAd to set appropriate INNativeAdDelegate.

- (void)loadAds {
    // Create new request
    INNativeDiscoveryRequest *request = [INNativeDiscoveryRequest requestWithAdUnitIdentifier:@"23"];

    [request startWithCompletionHandler:^(INNativeDiscoveryRequest *request, NSArray *response, NSError *error) {
        if (error) {
            NSLog(@"Error in loading ads: %@", error);
        } else {
            // Set INNativeAdDelegate to self
            for (INNativeAd *ad in response) {
                ad.delegate = self;
            }
            self.ads = response;
        }
    }];
}