IMAAdsLoader Class Reference

IMAAdsLoader Class Reference

Overview

The IMAAdsLoader class allows the requesting of ads from the ad server.

Use the delegate to receive the loaded ads or loading error in case of failure.

Inherits NSObject.

Instance Methods

(instancetype) - initWithSettings:
 Initializes an IMAAdsLoader with specific settings. More...
 
(instancetype) - init
 Initializes the IMAAdsLoader with default settings. More...
 
(void) - requestAdsWithRequest:
 Request ads from the ad server. More...
 
(void) - contentComplete
 Signal to the SDK that the content has completed. More...
 

Class Methods

(NSString *) + SDKVersion
 Returns the SDK version. More...
 

Properties

IMASettings * settings
 SDK-wide settings. More...
 
id< IMAAdsLoaderDelegatedelegate
 Delegate that receives IMAAdsLoaderDelegate callbacks. More...
 

Method Documentation

+ (NSString *) SDKVersion

Returns the SDK version.

Returns
the SDK version
- (instancetype) initWithSettings: (IMASettings *)  settings

Initializes an IMAAdsLoader with specific settings.

The loader takes 1-2 seconds to setup once initialized, therefore reusing a single instance of the ads loader is encouraged to minimize ad request times.

Parameters
settingsthe IMASettings to use for SDK wide settings. Uses defaults when nil.
Returns
an IMAAdsLoader instance with given IMASettings
- (instancetype) init

Initializes the IMAAdsLoader with default settings.

The loader takes 1-2 seconds to setup once initialized, therefore reusing a single instance of the ads loader is encouraged to minimize ad request times.

Returns
an IMAAdsLoader instance with default IMASettings
- (void) requestAdsWithRequest: (IMAAdsRequest *)  request

Request ads from the ad server.

The loader takes 1-2 seconds to setup on init and become ready to make ad requests. So reusing the same IMAAdsLoader instance is encouraged when making ad requests in order to minimize ad request times.

Parameters
requestthe IMAAdsRequest. If it was created for use with Picture-in-Picture, this IMAAdsLoader instance's IMASettings must have backround playback enabled
- (void) contentComplete

Signal to the SDK that the content has completed.

The SDK will play post-rolls at this time, if any are scheduled.

Property Documentation

- (IMASettings*) settings
readnonatomiccopy

SDK-wide settings.

Note that certain settings will only be evaluated during initialization of the adsLoader.

- (id<IMAAdsLoaderDelegate>) delegate
readwritenonatomicweak

Delegate that receives IMAAdsLoaderDelegate callbacks.

Send feedback about...

IMA Client-Side SDK for tvOS
Need help? Visit our support page.