Millennial Media iOS Advertiser SDK - Version 4.6.1

Included here are all of the resources for integrating the Millennial Media iOS Advertiser SDK into your application.


The Millennial Media iOS Advertiser SDK is an Objective-C library that allows advertisers to create a powerful link between ads running on Millennial Media’s platform and their own custom advertiser apps. The Advertiser SDK enables apps to show a transitional overlay when launched by an advertisement shown in a third-party app. Additionally, it allows advertisers to track the number of users who downloaded your app or completed another action as a result of an advertisement.

This document covers integrating the Advertiser SDK into your app. It is written for developers and product managers with the assumption that they are familiar with iOS development, Xcode, and Objective-C.

What’s New In This Version

  • Added support for Xcode 4.5 and ARMv7s architecture. (ARMv6 and Xcode 4.4+ are still supported.)
  • AdSupport.framework is now required when compiling for iOS SDK 6.0. (Weak link when compiling for 6.0 and 5.0-5.1.1.)
  • Supports the iOS 6 advertisingIdentifier.
  • Eliminated SBJSON conflicts.
  • Added log levels.
  • Updated conversion tracking.
  • Compiled as no thumb.
  • Added method for millennialMediaIdentifier.

Contents of Zip File

  • Readme.pdf
  • Changelog
  • License
  • libMMAdvertiser.a
  • MMAdvertiser.h

Quick Start

Step 1: Download the iOS Advertiser SDK.

Download the iOS Advertiser SDK here:

Step 2: Add the MMAdvertiser.h and libMMAdvertiser.a files to your Xcode project.

Add the MMAdvertiser.h and libMMAdvertiser.a files to your Xcode project by dragging both files into your “Groups & Files” view.

Step 3: Add the SystemConfiguration and AdSupport frameworks to your project.

If you are targeting iOS 6, the AdSupport framework is required. If you are supporting previous versions of iOS, you will need to weak link the AdSupport.framework.

Step 4: Inside your App Delegate implementation file, implement the code below.

Be sure to replace “YOUR_APP_TRACKING_ID” with the value assigned to your campaign.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Track conversion
    [[MMAdvertiser sharedSDK] trackConversionWithGoalId:@"YOUR_APP_TRACKING_ID"];

    return YES;

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url{
    // Set any info you want to pass to the overlay
    [[MMAdvertiser sharedSDK] setValue:@"test_value" forKey:@"test_key"];

    // Have the advertiser app SDK look at the url and open an overlay if needed
    // parameters will contain the parse URL query string key/value pairs
    NSDictionary *parameters = [[MMAdvertiser sharedSDK] parseURL:url];

    return YES;

App Re-engagement

Advertisers targeting users with app re-engagement campaigns must register a scheme in the app so that an advertising campaign can launch the app.

Adding a Scheme

Step 1: Select your project on the left-hand side of the window.
Step 2. Select your Target and select “Info”.
Step 3. Click the “Add” button and select “Add URL Type”.
Step 4. You’ll now have a new URL Type names “Untitled” in the URL Types section. Click the grey triangle next to “Untitled” to expand the view to edit.
Step 5. Enter your URL Scheme into the “URL Scheme” field. A good URL Scheme would be the name of your app with no special characters or spaces.
Step 6. Name your new scheme title by editing the field “Identifier”.
Step 7. Congratulations! You’ve now setup your app with a scheme.

To test, compile and run the code on your device. Open Safari and enter your URL Scheme followed by “://”, (ex. sampleapp:// ) into the address field. If everything is set up correctly, your application should open.

MMAdvertiser API - SDK v4.6.1

Class Methods


Accesses the singleton MMAdvertiserSDK object.

+ (MMAdvertiser *) sharedSDK

Return Value

A singleton MMAdvertiser object.


v4.5.0 and later.

Instance Methods


Parses a URL that opens an application. parseURL will return an NSDictionary containing the key/value pairs of the query string from the URL used to open the application.

- (NSDictionary *) parseURL: (NSURL *) url


v4.5.0 and later.


Track your application conversions using your App Tracking ID. Call this method when the application is opened to track conversions in your application.

- (void) trackConversionWithGoalId: (NSString *) goalid;


v4.5.0 and later.


Set a value/key pair data point to pass into the overlay.

- (void) setValue:(id)value forKey:(NSString *)key;


v4.5.0 and later.


Get the value for a key that was set using setValue:forKey:

- (id) valueForKey: (NSString *) key;


v4.5.0 and later


Returns an NSDictionary object of all the key/value pairs set.

- (NSDictionary *) storedKeyValuePairs;


v4.5.0 and later,


Returns YES if an overlay is covering the screen, NO otherwise.

- (BOOL) isOverlayShowing;


v4.5.0 and later,


Force the overlay to close if it is showing.

- (BOOL) closeOverlay;


v4.5.0 and later,

For More Information