GoogleInteractiveMediaAds Framework Reference

  • IMASecureSignalsAdapter is a protocol for adapters that provide secure 3rd party signals to the IMA SDK for ad auctions.

  • The protocol includes methods to initialize the adapter, retrieve the adapter and ad SDK versions, and collect encrypted signals.

  • The collectSignalsWithCompletion: method is called on a non-main thread and requires the adapter to call a completion handler with the signals or an error.

IMASecureSignalsAdapter

@protocol IMASecureSignalsAdapter <NSObject>

Adapter that provides secure signal(3rd party signal only) to the IMA SDK to be included in an

  • auction.
  • Initializes the Secure Signal adapter.

    Declaration

    Swift

    init?()

    Objective-C

    - (nullable instancetype)init;
  • The version of the adapter.

    Declaration

    Swift

    static func adapterVersion() -> IMAVersion

    Objective-C

    + (nonnull IMAVersion *)adapterVersion;
  • The version of the ad SDK.

    Declaration

    Swift

    static func adSDKVersion() -> IMAVersion

    Objective-C

    + (nonnull IMAVersion *)adSDKVersion;
  • Asks the receiver for encrypted signals. Signals are provided to the 3PAS at request time. The receiver must call completionHandler with signals or an error. This method is called on a non-main thread. The receiver should avoid using the main thread to prevent signal collection timeouts.

    Declaration

    Swift

    func collectSignals() async throws -> String

    Objective-C

    - (void)collectSignalsWithCompletion:
        (nonnull IMASignalCompletionHandler)completion;

    Parameters

    completion

    The block to call when signal collection is complete.