FeedAd iOS SDK

This guide explains how to integrate the FeedAd SDK into an iOS app. The SDK can be used within both Objective-C and Swift apps. This guide walks you through all steps necessary to get started with the integration of the specific ad types.

Requirements

  • A FeedAd SDK client token to be found in the admin panel
  • iOS SDK 8.0+
  • CocoaPods

Installation

The FeedAd SDK is available as a pod via CocoaPods.

Install it by adding it to the Podfile in your project:

target "YourTarget" do
  pod "FeedAd"
end

After running pod install, the library should be ready for use.

Initialization

The SDK needs to be initialized with your client token as soon as your app starts. Add the following initialization code to your app delegate:

Using Objective-C:

#import <FeedAd/FeedAd.h>

@implementation FAAppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// ...

    // Setup config with client token
    FAConfig *config = [FAConfig new];
    config.clientToken = @"your-client-token";

    // Configure FAManager
    [[FAManager sharedManager] configure:config];

// ...
}

@end

Using Swift:

Import the FeedAd framework into your bridging header:

#import <FeedAd/FeedAd.h>

Update your app delegate:

class AppDelegate: UIResponder, UIApplicationDelegate {

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// ...

    // Setup config with client token
    let config = FAConfig()
    config.clientToken = "your-client-token"

    // Configure FAManager
    FAManager.shared().configure(config)

// ...
}

Integration Guides

Now that the SDK has been initialized, please continue with the specific integration guides for the ad types you would like to integrate into your app:

Demo Apps

If you rather prefer to dive right into the code, you can also take a look at our iOS demo apps written in Objective-C and Swift that demonstrate a working integration.