ALSdk Class Reference

Inherits from NSObject
Declared in ALSdk.h

Overview

This is a base class for the AppLovin iOS SDK.

SDK Configuration

  sdkKey

This SDK’s key.

@property (strong, nonatomic, readonly) NSString *sdkKey

Discussion

This SDK’s key.

Declared In

ALSdk.h

  settings

This SDK’s settings.

@property (strong, nonatomic, readonly) ALSdkSettings *settings

Discussion

This SDK’s settings.

Declared In

ALSdk.h

– setPluginVersion:

Set plugin version.

- (void)setPluginVersion:(NSString *)pluginVersion

Parameters

pluginVersion

Some descriptive string which identifies the plugin.

Discussion

Set plugin version.

This is mainly used internally, however if you’ve written a mediation adaptor or plugin, you can set this. Common examples include things like “Cocos2D Plugin v1.0”.

Declared In

ALSdk.h

  mediationProvider

Set mediation provider using one of the provided strings in ALMediationProvider.h, or your own if not defined.

@property (atomic, copy, alnullable) NSString *mediationProvider

Discussion

Set mediation provider using one of the provided strings in ALMediationProvider.h, or your own if not defined.

Declared In

ALSdk.h

SDK Information

+ version

Get the current version of the SDK.

+ (NSString *)version

Return Value

The current SDK version.

Discussion

Get the current version of the SDK.

Declared In

ALSdk.h

+ versionCode

Get the current version of the SDK in numeric format.

+ (NSUInteger)versionCode

Return Value

The current SDK version in numeric format.

Discussion

Get the current version of the SDK in numeric format.

Declared In

ALSdk.h

SDK Services

  adService

Get an instance of AppLovin Ad service. This service is used to fetch and display ads from AppLovin servers.

@property (strong, nonatomic, readonly) ALAdService *adService

Return Value

Ad service. Guaranteed not to be null.

Discussion

Get an instance of AppLovin Ad service. This service is used to fetch and display ads from AppLovin servers.

Declared In

ALSdk.h

  nativeAdService

Get an instance of AppLovin Native Ad service. This service is used to fetch and display native ads from AppLovin servers.

@property (strong, nonatomic, readonly) ALNativeAdService *nativeAdService

Return Value

Native ad service. Guaranteed not to be null.

Discussion

Get an instance of AppLovin Native Ad service. This service is used to fetch and display native ads from AppLovin servers.

Declared In

ALSdk.h

  postbackService

Get an instance of the AppLovin postback service. This service is used to dispatch HTTP GET postbacks to arbitrary URLs.

@property (strong, nonatomic, readonly) ALPostbackService *postbackService

Return Value

Postback service. Guaranteed not to be null.

Discussion

Get an instance of the AppLovin postback service. This service is used to dispatch HTTP GET postbacks to arbitrary URLs.

Declared In

ALSdk.h

  eventService

Get an instance of the AppLovin event service. This service is used to track post-install user events.

@property (strong, nonatomic, readonly) ALEventService *eventService

Return Value

Event service. Guaranteed not to be null.

Discussion

Get an instance of the AppLovin event service. This service is used to track post-install user events.

Declared In

ALSdk.h

  userIdentifier

Set a string which identifies the current user, which will be passed through to your server via our optional S2S postbacks.

@property (copy, nonatomic, alnullable) NSString *userIdentifier

Discussion

Set a string which identifies the current user, which will be passed through to your server via our optional S2S postbacks.

If you’re using reward validation, you can optionally set a user identifier to be included with currency validation postbacks. For example, a user name. We’ll include this in the postback when we ping your currency endpoint from our server.

Declared In

ALSdk.h

SDK Initialization

– initializeSdk

Initialize current version of the SDK.

- (void)initializeSdk

Discussion

Initialize current version of the SDK.

Declared In

ALSdk.h

+ initializeSdk

Initialize the default instance of AppLovin SDK.

+ (void)initializeSdk

Discussion

Initialize the default instance of AppLovin SDK.

Please make sure that application’s Info.plist includes a property ‘AppLovinSdkKey’ that is set to provided SDK key.

Declared In

ALSdk.h

Getting SDK Instances

+ shared

Get a shared instance of AppLovin SDK.

+ (alnullable ALSdk *)shared

Return Value

An instance of AppLovinSDK

Discussion

Get a shared instance of AppLovin SDK.

Please make sure that application’s Info.plist includes a property ‘AppLovinSdkKey’ that is set to provided SDK key.

Declared In

ALSdk.h

+ sharedWithKey:

Get an instance of AppLovin SDK using default SDK settings.

+ (alnullable ALSdk *)sharedWithKey:(NSString *)sdkKey

Parameters

sdkKey

SDK key to use. Must not be nil.

Return Value

An instance of AppLovinSDK

Discussion

Get an instance of AppLovin SDK using default SDK settings.

Declared In

ALSdk.h

+ sharedWithKey:settings:

Get an instance of AppLovin SDK.

+ (alnullable ALSdk *)sharedWithKey:(NSString *)sdkKey settings:(ALSdkSettings *)settings

Parameters

sdkKey

SDK key to use. Must not be nil.

settings

User-provided settings. Must not be nil, but can be an empty [[ALSdkSettings alloc] init] object.

Return Value

An instance of AppLovinSDK

Discussion

Get an instance of AppLovin SDK.

Declared In

ALSdk.h