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 creativeType
Swift
var creativeType: OMIDCreativeType { get set }
-
Declaration
Objective-C
@property OMIDImpressionType impressionType
Swift
var impressionType: OMIDImpressionType { get set }
-
Declaration
Objective-C
@property BOOL isolateVerificationScripts
Swift
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) throws
Parameters
creativeType
the type of creative to be rendered in this session.
impressionType
the type of impression to be triggered in this session.
impressionOwner
whether the native or JavaScript layer should be responsible for supplying the impression event.
mediaEventsOwner
whether 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
OMIDNoneOwner
for display. When the creativeType isOMIDCreativeTypeDefinedByJavaScript
then this should be set toOMIDJavaScriptOwner
isolateVerificationScripts
determines 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.