Get Started

Prerequisites

(Please move the CheetahMobileAds.bundle into the Resource Directory of your Application!)

Option [B]:

(Please move the CheetahMobileAds.bundle into the Resource Directory of your Application!)

Add following frameworks.

(If you are using the "CheetahMobileAds.framework", then the item "6" might be replaced by "CheetahMobileAds.framework")

Add "-ObjC" to "Other Linker Flags"

Initialize Orion ads

AppDelegate.m
// if CheetahMobileAds.framework
@import CheetahMobileAds;

// else if CheetahMobileAds.a
#import <CheetahMobileAds.h>

CMAMIDConfig *MIDConfig = [[CMAMIDConfig alloc] 
    initWithOrionMID:@"YOUR_MID" liehuMID:@"YOUR_MID_FOR_CHINA"];
BOOL isEUUser = [[NSUserDefaults standardUserDefaults] boolForKey:@"isEUUser"];
BOOL isUserDataEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:@"isUserDataEnabled"];

[CheetahMobileAds 
    startWithMIDConfig:MIDConfig 
        isEUUser:isEUUser 
        allowUserData:isUserDataEnabled];

About GDPR

The difference after enabling "allowUserData"

If setting "allow user data" is enabled, we will collect extra data - "idfa' and "idfv"

Last updated