OMIDAdSessionConfiguration
Objective-C
@interface OMIDAdSessionConfiguration : NSObject
Swift
class OMIDAdSessionConfiguration : NSObject
The ad session configuration supplies the owner for both the impression and video events. The OM SDK JS service will use this information to help identify where the source of these events is expected to be received.
-
Declaration
Objective-C
@property OMIDCreativeType creativeTypeSwift
var creativeType: OMIDCreativeType { get set } -
Declaration
Objective-C
@property OMIDImpressionType impressionTypeSwift
var impressionType: OMIDImpressionType { get set } -
Declaration
Objective-C
@property BOOL isolateVerificationScriptsSwift
var isolateVerificationScripts: Bool { get set } -
-initWithCreativeType:impressionType: impressionOwner: mediaEventsOwner: isolateVerificationScripts: error: Create new ad session configuration supplying the owner for both the impression and media events along with the type of creative being rendered/measured. The OM SDK JS service will use this information to help identify where the source of these events is expected to be received.
Declaration
Objective-C
- (nullable instancetype)initWithCreativeType:(OMIDCreativeType)creativeType impressionType:(OMIDImpressionType)impressionType impressionOwner:(OMIDOwner)impressionOwner mediaEventsOwner:(OMIDOwner)mediaEventsOwner isolateVerificationScripts:(BOOL)isolateVerificationScripts error:(NSError *_Nullable *_Nullable) error;Swift
init(creativeType: OMIDCreativeType, impressionType: OMIDImpressionType, impressionOwner: OMIDOwner, mediaEventsOwner: OMIDOwner, isolateVerificationScripts: Bool) throwsParameters
creativeTypethe type of creative to be rendered in this session.
impressionTypethe type of impression to be triggered in this session.
impressionOwnerwhether the native or JavaScript layer should be responsible for supplying the impression event.
mediaEventsOwnerwhether the native or JavaScript layer should be responsible for supplying media events. This needs to be set only for non-display ad sessions and can be set to
OMIDNoneOwnerfor display. When the creativeType isOMIDCreativeTypeDefinedByJavaScriptthen this should be set toOMIDJavaScriptOwnerisolateVerificationScriptsdetermines whether verification scripts will be placed in a sandboxed environment. This will not have any effect for native sessions.
Return Value
A new session configuration instance. Returns nil and sets error if OM SDK isn’t active or arguments are invalid.
OMIDAdSessionConfiguration Class Reference