OMIDAdSessionContext
@interface OMIDAdSessionContext : NSObject
- (null_unspecified instancetype)init NS_UNAVAILABLE;
/*
* Initializes a new ad session context providing reference to partner and web view where OMID JS has been injected.
*
* Calling this method will set the ad session type to “html”.
* <p>
* NOTE: any attempt to create a new ad session will fail if OMID has not been activated (see {@link OMIDSDK} class for more information).
*
* @param partner Details of the integration partner responsible for the ad session.
* @param webView The webView responsible for serving the ad content. Must be a UIWebView or WKWebView instance. The receiver holds a weak reference only.
* @return A new HTML context instance. Returns nil if OMID has not been activated or if any of the parameters are nil.
* @see OMIDSDK
*/
- (nullable instancetype)initWithPartner:(nonnull OMIDPartner *)partner
webView:(nonnull UIView *)webView
customReferenceIdentifier:(nullable NSString *)customReferenceIdentifier
error:(NSError *_Nullable *_Nullable)error;
/*
* Initializes a new ad session context providing reference to partner and a list of script resources which should be managed by OMID.
*
* Calling this method will set the ad session type to “native”.
* <p>
* NOTE: any attempt to create a new ad session will fail if OMID has not been activated (see {@link OMIDSDK} class for more information).
*
* @param partner Details of the integration partner responsible for the ad session.
* @param resources The array of all verification providers who expect to receive OMID event data. Must contain at least one verification script. The receiver creates a deep copy of the array.
* @return A new native context instance. Returns nil if OMID has not been activated or if any of the parameters are invalid.
* @see OMIDSDK
*/
- (nullable instancetype)initWithPartner:(nonnull OMIDPartner *)partner
script:(nonnull NSString *)script
resources:(nonnull NSArray<OMIDVerificationScriptResource *> *)resources
customReferenceIdentifier:(nullable NSString *)customReferenceIdentifier
error:(NSError *_Nullable *_Nullable)error;
@end
Properties
-
Properties
Declaration
Objective-C
- (null_unspecified instancetype)init NS_UNAVAILABLE;
-
Properties
Declaration
Objective-C
- (nullable instancetype)initWithPartner:(nonnull OMIDPartner *)partner webView:(nonnull UIView *)webView customReferenceIdentifier:(nullable NSString *)customReferenceIdentifier error:(NSError *_Nullable *_Nullable)error;
Swift
init(partner: OMIDPartner, webView: UIView, customReferenceIdentifier: String?) throws
-
Properties
Declaration
Objective-C
- (nullable instancetype)initWithPartner:(nonnull OMIDPartner *)partner script:(nonnull NSString *)script resources:(nonnull NSArray<OMIDVerificationScriptResource *> *)resources customReferenceIdentifier:(nullable NSString *)customReferenceIdentifier error:(NSError *_Nullable *_Nullable)error;
Swift
init(partner: OMIDPartner, script: String, resources: [OMIDVerificationScriptResource], customReferenceIdentifier: String?) throws