Adding the iOS SDK

Adding the iOS SDK to your XCode project is fast and simple. Just follow these steps and you’ll be up and running.

Add the Medio SDK

  1. Download the Medio iOS SDK.
  2. Using the Mac’s Finder, locate the ZIP archive containing the SDK and unzip it.
  3. Drag the MedioEvent folder to your Xcode Project Navigator panel and drop it inside your project’s directory. Make sure “Copy items into destination group’s folder” is selected in the Xcode dialog after you drop the folder.ios_sdk_medioevent

Add frameworks

Add the frameworks shown in the screenshot below. Mark each framework as Required or Optional as shown below.

ios_sdk_required_frameworks

Add the code

Incorporate the following lines of code into your app. Note that we’ll provide you with an API key for your app (shown as API_KEY in the code below) when you sign up with Medio.

#include "MedioEvent.h"

- (BOOL)application:(UIApplication *)application
        didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [MEDIOEVENT configureWithAPIKey:API_KEY];
    [MEDIOEVENT openSession];

    return YES;
}

- (void)applicationWillTerminate:(UIApplication *)application {
    [MEDIOEVENT closeSession];
}