OMIDAdEvents

@interface OMIDAdEvents : NSObject

/*
 *  Initializes ad events instance associated with the supplied ad session.
 *
 * @param session The ad session associated with the ad events.
 * @return A new ad events instance associated with the supplied ad session. Returns nil if the supplied ad session is nil or if an ad events instance has already been registered with the ad session.
 */
- (nullable instancetype)initWithAdSession:(nonnull OMIDAdSession *)session error:(NSError * _Nullable * _Nullable)error;

/*
 *  Notifies the ad session that an impression event has occurred.
 *
 *  When triggered all registered verification providers will be notified of this event.
 *
 * NOTE: the ad session will be automatically started if this method has been called first.
 */
- (BOOL)impressionOccurredWithError:(NSError *_Nullable *_Nullable)error;

@end

Properties

  • Properties

    Declaration

    Objective-C

    - (nullable instancetype)initWithAdSession:(nonnull OMIDAdSession *)session error:(NSError * _Nullable * _Nullable)error;

    Swift

    init(adSession session: OMIDAdSession) throws
  • Properties

    Declaration

    Objective-C

    - (BOOL)impressionOccurredWithError:(NSError *_Nullable *_Nullable)error;

    Swift

    func impressionOccurred() throws