ios version mobage west · ios version (mobage west) this guide explains how to add the ad tracking...

11
Mobage SDK Ad Tracking Library Copyright ©2013 DeNA. All Rights Reserved Page 1 of 11 Mobage SDK Ad Tracking Library iOS Version ( Mobage West ) This guide explains how to add the Ad Tracking Library to your Mobage iOS app. The Ad Tracking Library provides Mobage with information about how many users have clicked on an advertisement, and then installed your app. You can use the Ad Tracking Library with the Mobage Native SDK or Unity SDK. Note: The Ad Tracking Library was previously called the Install Tracking Framework. As a result, MobageInstallTracking.framework is now MobageAdTracking.framework and MBInstallTracking.plist is now MBAdTracking.plist. You are only required to use the Ad Tracking Library if you want Mobage to promote your app. If you do not use the Ad Tracking Library , you can still release your app on the Mobage platform, but Mobage will not be able to promote the app on your behalf. Change History Ver. Change Last Update 2.2.2 Hotfix Resolved an issue affecting versions 2.2 and 2.2.1 of the library that caused a crash to occur on iPhone and iPod touch devices running iOS 6.1 and later. 2013/05/15 2.2.1 Now supports the vendor identifier and advertising identifier that Apple has approved for iOS 6 and removes access to the device's unique device identifier (UDID) from all iOS versions. For iOS 5, it uses MAC address as a device identifier. Updated the Testing section. Added Security.framework. 2013/04/25 2.2 You can now extract the Ad Tracking Library version number from the command line. Every time the app launches, it will send a fingerprint to MdotM. Integrated the DeNA Click & Conversion Server. 2013/04/01 2.1.2 Added a list of ad networks that updated their integration. Added StoreKit.framework in the list of system frameworks. 2013/02/05 2.1.0.1 Corrected the list of supported ad networks and the instructions for adding the .plist file to your project. 2012/11/20 2.1 Mobage SDK Ad Tracking Library 2.1 release. 2012/11/07 2.0 Mobage SDK Ad Tracking Library 2.0 release. 2012/08/31 1.0.1 Hotfix Revised the sample ad tracking IDs. 2012/06/15 1.0.1 Documented the required frameworks for projects that use version 1.0.1 of the Ad Tracking Library. 2012/05/31 1.0 Mobage Native SDK Ad Tracking Library 1.0 release. 2012/05/18

Upload: lenhan

Post on 25-Apr-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

Mobage SDK Ad Tracking Library  

Copyright  ©2013  DeNA.    All  Rights  Reserved   Page 1 of 11  

Mobage SDK Ad Tracking Library

iOS Version (Mobage West) This guide explains how to add the Ad Tracking Library to your Mobage iOS app. The Ad Tracking Library provides Mobage with information about how many users have clicked on an advertisement, and then installed your app. You can use the Ad Tracking Library with the Mobage Native SDK or Unity SDK.

Note: The Ad Tracking Library was previously called the Install Tracking Framework. As a result, MobageInstallTracking.framework is now MobageAdTracking.framework and MBInstallTracking.plist is now MBAdTracking.plist.

You are only required to use the Ad Tracking Library if you want Mobage to promote your app. If you do not use the Ad Tracking Library, you can still release your app on the Mobage platform, but Mobage will not be able to promote the app on your behalf.

Change History Ver. Change Last Update 2.2.2 Hotfix Resolved an issue affecting versions 2.2 and 2.2.1 of the

library that caused a crash to occur on iPhone and iPod touch devices running iOS 6.1 and later.

2013/05/15

2.2.1 • Now supports the vendor identifier and advertising identifier that Apple has approved for iOS 6 and removes access to the device's unique device identifier (UDID) from all iOS versions. For iOS 5, it uses MAC address as a device identifier.

• Updated the Testing section. • Added Security.framework.

2013/04/25

2.2 You can now extract the Ad Tracking Library version number from the command line. Every time the app launches, it will send a fingerprint to MdotM. Integrated the DeNA Click & Conversion Server.

2013/04/01

2.1.2 Added a list of ad networks that updated their integration. Added StoreKit.framework in the list of system frameworks.

2013/02/05

2.1.0.1 Corrected the list of supported ad networks and the instructions for adding the .plist file to your project.

2012/11/20

2.1 Mobage SDK Ad Tracking Library 2.1 release. 2012/11/07 2.0 Mobage SDK Ad Tracking Library 2.0 release. 2012/08/31 1.0.1 Hotfix Revised the sample ad tracking IDs. 2012/06/15 1.0.1 Documented the required frameworks for projects that use

version 1.0.1 of the Ad Tracking Library. 2012/05/31

1.0 Mobage Native SDK Ad Tracking Library 1.0 release. 2012/05/18

Mobage SDK Ad Tracking Library  

Copyright  ©2013  DeNA.    All  Rights  Reserved   Page 2 of 11  

Table of Contents

1. Overview  ...............................................................................................................  3  

2. The Ad Tracking Library for iOS  ........................................................................  4  Development Environment  ..................................................................................................................................  4  Environment Used in This Guide  ......................................................................................................................  4  Contents of the Ad Tracking Library  ................................................................................................................  5  Changes to the Use of Device IDs  ..................................................................................................................  6  

3. Using the Ad Tracking Library for iOS  .............................................................  7  Requesting Ad Network Identifiers  ..................................................................................................................  7  Adding the Ad Tracking Library to Your Project  ........................................................................................  7  Configuring the Ad Tracking Library  ................................................................................................................  8  Integrating Ad Networks without the Ad Tracking Library  ....................................................................  8  Unity Only: Updating Header Files  ..................................................................................................................  8  Extracting the Version Number  ..........................................................................................................................  9  Testing the Ad Tracking Library  ......................................................................................................................  10  Copyright Information  ..........................................................................................................................................  11  

Mobage SDK Ad Tracking Library  

Copyright  ©2013  DeNA.    All  Rights  Reserved   Page 3 of 11  

1. Overview To add the Ad Tracking Library to your iOS application, you must complete these tasks: 1. Contact Mobage to request ad network identifiers for your app.

2. Add the Ad Tracking Library to your Xcode or Unity project. 3. Create a .plist file that contains the ad network identifiers for your app. 4. Test your app to verify that it is contacting all of the supported ad networks. The following sections have more details about these tasks.

Mobage SDK Ad Tracking Library  

Copyright  ©2013  DeNA.    All  Rights  Reserved   Page 4 of 11  

2. The Ad Tracking Library for iOS

This section provides details about the development environment required to use the Ad Tracking Library for iOS, as well as the supported device operating systems. Later, this section discusses the files that are bundled with the framework.

Development Environment

Your development environment needs to meet the following requirements to use the Ad Tracking Library on the iOS platform.

• [OS] Mac OS X 10.7 or later. • [Development Tools] Xcode 4.5 or later. Note: As of version 2.1, earlier versions of Xcode are no

longer supported. • [Target Device OS] iOS 5 or later. Note: As of version 2.1, iOS 4.3.3 is no longer supported.

Environment Used in This Guide

• [OS] Mac OS X Lion (10.7.4) • [Xcode] Xcode 4.5 • [Target] iOS 5.1

Mobage SDK Ad Tracking Library  

Copyright  ©2013  DeNA.    All  Rights  Reserved   Page 5 of 11  

Contents of the Ad Tracking Library

The Ad Tracking Library for iOS contains the following files:

Filename Description MBAdTracking.plist The ad network parameter file. MobageAdTracking.framework Core files for the Ad Tracking Library. Ad_Tracking_Library_iOS.pdf This document.

To use the Ad Tracking Library, you must request identifiers from Mobage for all of the following ad networks. See “Requesting Ad Network Identifiers” on page 7 for details.

• AdColony • AppRedeem/AppTrailers • Appsfire • DeNA Click & Conversion Server • Chartboost • Fiksu • InMobi

• Jumptap • Kochava • LeadBolt • LifeStreet • MdotM Universal • Millennial Media • Tapjoy • W3i

Important: Your project must not include any additional frameworks for the following ad networks:

• AppRedeem • Chartboost • Fiksu • InMobi • Leadbolt • LifeStreet • Tapjoy

The Ad Tracking Library will not work correctly if you include separate frameworks for these ad networks.

Mobage SDK Ad Tracking Library  

Copyright  ©2013  DeNA.    All  Rights  Reserved   Page 6 of 11  

Changes to the Use of Device IDs

To comply with Apple's policy changes regarding the use of the unique device identifier (UDID) for iOS 6, we have updated the Ad Tracking Library to use the approved Vendor (IFV) and Advertising (IFA) identifiers. For apps running on iOS 5, the Ad Tracking Library uses the MAC address. The following table lists the IDs used for each ad network for both iOS 5 and iOS 6.

Ad Network iOS 5 ID iOS 6 ID AdColony SHA1-MAC IFA AppRedeem MD5-MAC IFA AppsFire OpenUDID, IP address IFA, IP address Chartboost Their own ID Their own ID Fiksu MAC, fiksuid IFA, IFV, fiksuid InMobi Their own ID Their own ID Jumptap SHA1-MAC IFA Kochava MAC, OpenUDID, IP

address IFA, IFV

Leadbolt MAC Their own ID Lifestreet Not tracking IFA MdotM SHA1-MAC IFA Millennial SHA1-MAC SHA1-IFA Tapjoy MAC, SHA1-MAC IFA W3i IP address, SHA1-MAC,

OpenUDID IFA

Mobage SDK Ad Tracking Library  

Copyright  ©2013  DeNA.    All  Rights  Reserved   Page 7 of 11  

3. Using the Ad Tracking Library for iOS To start using the Ad Tracking Library, add the Ad Tracking Library to your iOS project. This section assumes that you have already created a project for your app. For more information about creating a new project, see the Programming Guide for your Mobage SDK.

Requesting Ad Network Identifiers

When you are ready to start using the Ad Tracking Library, ask Mobage to generate the ad network identifiers for your app. To request the identifiers, send an email to [email protected], and cc: [email protected]. Be sure to provide the name of your company and the proposed name of your app.

Important To avoid delays, ask Mobage to generate the ad network identifiers at least four weeks before you plan to launch your app.

Adding the Ad Tracking Library to Your Project

To use the Ad Tracking Library, you must add MobageAdTracking.framework to your app’s Xcode project. You must add all the following system frameworks:

AdSupport.framework (linked as “Optional”) CoreGraphics.framework CoreLocation.framework CoreTelephony.framework Foundation.framework MediaPlayer.framework MessageUI.framework MobageAdTracking.framework MobileCoreServices.framework QuartzCore.framework Security.framework StoreKit.framework (linked as “Optional”) SystemConfiguration.framework UIKit.framework

Finally, to ensure that your build uses the linker flags required by the Native SDK, update your project build settings to include the following flags:

-ObjC -lstdc++

Mobage SDK Ad Tracking Library  

Copyright  ©2013  DeNA.    All  Rights  Reserved   Page 8 of 11  

Configuring the Ad Tracking Library

Once you receive your ad network identifiers from Mobage, you can set up the .plist file for your app. To set up the .plist file, copy the file MBAdTracking.plist to your project folder, then replace the default identifiers with the correct identifiers for your app.

The Ad Tracking Library is now integrated into your app—you do not need to add any code to your app. However, you should use the test code in the following section to verify that your app is able to contact the ad networks.

Integrating Ad Networks without the Ad Tracking Library

You can choose to integrate specific ad networks independently of the complete Mobage Ad Tracking Library. To integrate these ad networks independently:

1. Open the MBAdTracking.plist file. 2. Remove the key for the ad network that you want to integrate independently.

Note: You cannot remove the key for the ad networks marked with an asterisk (*) in the following table.

3. For ad networks with SDK integration, include the ad network's header files for the version Mobage has integrated but do not include the binary. Your project will link against the version of the SDK that is already bundled in the Mobage Ad Tracking Library.

4. For ad networks with S2S, integrate the library normally, including both the ad network's header files and the binary.

The following table lists whether the ad networks are integrated via their SDK or server-to-server (S2S).

Ad Network SDK or S2S Integration AdColony SDK version 2.0.1.33 AppRedeem/App Trailers* SDK version 2.0 (custom) AppsFire S2S Chartboost* SDK version 3.2 DeNA Click & Conversion Server S2S Fiksu* SDK version 3.3 InMobi* SDK version 2.5.4 Jumptap S2S Kochava S2S Leadbolt SDK version 2.0.3 Lifestreet* SDK (no version) MdotM Universal S2S Millennial Media S2S Tapjoy* SDK version 9.0.4 W3i S2S

Unity Only: Updating Header Files

If you are using Unity SDK version 2.2.3 or earlier, replace the following files in the Unity Editor directory with the new ones in this version of the Ad Tracking Library:

• MobageSettings.cs

Mobage SDK Ad Tracking Library  

Copyright  ©2013  DeNA.    All  Rights  Reserved   Page 9 of 11  

• mobage_patchxodeproj.py • mobage_postprocess.sh

Extracting the Version Number

After integrating the Library into your app, you can extract the version number from the command line by typing the following:

% strings YOUR_APP.app/YOUR_APP | grep 'MobageAdTracking: ' => v2.2.2

Mobage SDK Ad Tracking Library  

Copyright  ©2013  DeNA.    All  Rights  Reserved   Page 10 of 11  

Testing the Ad Tracking Library

You can test your integration of the Ad Tracking Library by monitoring testing messages. To test the Library, follow these instructions:

1. To display testing messages on the device console, open the plist file in Xcode, and set the __TEST parameter to YES.

2. To send pings every time the app launches rather than just the initial launch, set the __FORCE_REPORT parameter to YES as displayed below:

3. Once you have finished testing, you can either set the __TEST and __FORCE_REPORT parameters to NO or remove them before creating a production build.

The following sample shows the testing messages displayed on the device console, which you can monitor to ensure that the Ad Tracking Library is working correctly:

Mobage SDK Ad Tracking Library  

Copyright  ©2013  DeNA.    All  Rights  Reserved   Page 11 of 11  

[MobageAdTracking.framework] MobageAdTracking: v2.2.2 has been loaded. ATL: AdColony configured ATL: App-O-Day configured ATL: AppRedeem configured ATL: AppsFire configured ATL: CC configured ATL: Chartboost configured ATL: Fiksu configured ATL: Flurry configured ATL: InMobi configured ATL: Jumptap configured ATL: Kochava configured ATL: Leadbolt configured ATL: Lifestreet configured ATL: MdotM configured ATL: Millennial configured ATL: Tapjoy configured ATL: W3i configured [MobageAdTracking.framework] has config file, reporting... ATL: AdColony reporting installation ATL: AppRedeem reporting installation ATL: AppsFire reporting installation ATL: Fiksu reporting installation ATL: Flurry reporting installation ATL: Jumptap reporting installation ATL: Leadbolt reporting installation ATL: Lifestreet reporting installation ATL: Millennial reporting installation ATL: Tapjoy reporting installation ATL: W3i reporting installation ATL: Chartboost reporting session ATL: MdotM reporting session

Copyright Information

The Ad Tracking Library is using JRswizzle (https://github.com/rentzsch/jrswizzle). Copyright © 2007-2011 Jonathan 'Wolf' Rentzsch: http://rentzsch.com. Some rights reserved: http://opensource.org/licenses/MIT.