ALSdk Class Reference

Inherits from NSObject
Declared in ALSdk.h

Overview

This is a base class for the AppLovin iOS SDK.

  version

The current version of the SDK. The returned value will be in the format of “..”.

@property (class, nonatomic, copy, readonly) NSString *version

Discussion

The current version of the SDK. The returned value will be in the format of “..”.

Declared In

ALSdk.h

  versionCode

The current version of the SDK in numeric format.

@property (class, nonatomic, assign, readonly) NSUInteger versionCode

Discussion

The current version of the SDK in numeric format.

Declared In

ALSdk.h

  sdkKey

This SDK’s SDK key.

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

Discussion

This SDK’s SDK key.

Declared In

ALSdk.h

  settings

This SDK’s SDK settings.

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

Discussion

This SDK’s SDK settings.

Declared In

ALSdk.h

  configuration

Get the SDK configuration object provided upon initialization.

@property (nonatomic, strong, readonly) ALSdkConfiguration *configuration

Discussion

Get the SDK configuration object provided upon initialization.

Declared In

ALSdk.h

– setPluginVersion:

Set plugin version for mediation adapter or plugin.

- (void)setPluginVersion:(NSString *)pluginVersion

Parameters

pluginVersion

Some descriptive string which identifies the plugin.

Discussion

Set plugin version for mediation adapter or plugin.

Declared In

ALSdk.h

  mediationProvider

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

@property (nonatomic, copy, nullable) 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

  adService

This service is used to load and display ads from AppLovin servers.

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

Discussion

This service is used to load and display 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 (nonatomic, strong, 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 (nonatomic, strong, 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

  userService

Service object for performing user-related tasks.

@property (nonatomic, strong, readonly) ALUserService *userService

Return Value

User service. Guaranteed not to be null.

Discussion

Service object for performing user-related tasks.

Declared In

ALSdk.h

  variableService

Get an instance of the AppLovin variable service. This service is used to perform various AB tests that you have set up on your AppLovin dashboard on your users.

@property (nonatomic, strong, readonly) ALVariableService *variableService

Return Value

Variable service. Guaranteed not to be null.

Discussion

Get an instance of the AppLovin variable service. This service is used to perform various AB tests that you have set up on your AppLovin dashboard on your users.

Declared In

ALSdk.h

  userIdentifier

Set an identifier for the current user. This identifier will be tied to SDK events and our optional S2S postbacks.

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

Discussion

Set an identifier for the current user. This identifier will be tied to SDK events and our optional S2S postbacks.

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

Declared In

ALSdk.h

– showMediationDebugger

Present the mediation debugger UI. This debugger tool provides the status of your integration for each third-party ad network.

- (void)showMediationDebugger

Discussion

Present the mediation debugger UI. This debugger tool provides the status of your integration for each third-party ad network.

Please call this method after the SDK has initialized, e.g. in the completionHandler of [ALSdk initializeSdkWithCompletionHandler:].

Declared In

ALSdk.h

– initializeSdk

Initialize the SDK.

- (void)initializeSdk

Discussion

Initialize the SDK.

Declared In

ALSdk.h

– initializeSdkWithCompletionHandler:

Initialize the SDK with a given completion block.

- (void)initializeSdkWithCompletionHandler:(nullable ALSdkInitializationCompletionHandler)completionHandler

Parameters

completionHandler

The callback that will be run when the SDK finishes initializing.

Discussion

Initialize the SDK with a given completion block.

The callback will be invoked on the main thread.

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 your SDK key is set in the application’s Info.plist under the property ‘AppLovinSdkKey’.

Declared In

ALSdk.h

+ initializeSdkWithCompletionHandler:

Initialize the default instance of AppLovin SDK.

+ (void)initializeSdkWithCompletionHandler:(nullable ALSdkInitializationCompletionHandler)completionHandler

Parameters

completionHandler

The callback that will be run on the main queue when the SDK finishes initializing.

Discussion

Initialize the default instance of AppLovin SDK.

Please make sure your SDK key is set in the application’s Info.plist under the property ‘AppLovinSdkKey’.

Declared In

ALSdk.h

+ shared

Get a shared instance of AppLovin SDK.

+ (nullable ALSdk *)shared

Return Value

The shared instance of AppLovin’s SDK, or nil if SDK key is not set in the application’s Info.plist.

Discussion

Get a shared instance of AppLovin SDK.

Please make sure your SDK key is set in the application’s Info.plist under the property ‘AppLovinSdkKey’.

Declared In

ALSdk.h

+ sharedWithSettings:

Get a shared instance of AppLovin SDK.

+ (nullable ALSdk *)sharedWithSettings:(ALSdkSettings *)settings

Parameters

settings

SDK settings object.

Return Value

The shared instance of AppLovin’s SDK, or nil if SDK key is not set in the application’s Info.plist.

Discussion

Get a shared instance of AppLovin SDK.

Please make sure your SDK key is set in the application’s Info.plist under the property ‘AppLovinSdkKey’.

Declared In

ALSdk.h

+ sharedWithKey:

Get an instance of AppLovin SDK using the provided SDK key.

+ (nullable ALSdk *)sharedWithKey:(NSString *)key

Parameters

key

SDK key to use for the instance of the AppLovin SDK.

Return Value

An instance of AppLovinSDK, or nil if SDK key is not set.

Discussion

Get an instance of AppLovin SDK using the provided SDK key.

Declared In

ALSdk.h

+ sharedWithKey:settings:

Get an instance of AppLovin SDK using the provided SDK key and SDK settings.

+ (nullable ALSdk *)sharedWithKey:(NSString *)key settings:(ALSdkSettings *)settings

Parameters

key

SDK key to use for the instance of the AppLovin SDK.

settings

SDK settings object.

Return Value

An instance of AppLovinSDK, or nil if SDK key is not set.

Discussion

Get an instance of AppLovin SDK using the provided SDK key and SDK settings.

Declared In

ALSdk.h