ProgrammaticAccessLibrary Framework Reference

  • PALNonceLoader enables publishers to create a PALNonceManager for individual content streams, facilitating ad requests within each stream.

  • It involves initializing the loader, creating a PALNonceRequest with relevant context, and then using loadNonceManagerWithRequest to obtain a PALNonceManager containing the nonce.

  • Developers can reuse the same PALNonceLoader for subsequent content streams by simply creating new PALNonceRequests, promoting efficiency.

  • PALNonceLoader supports concurrent requests and offers a delegate to receive callbacks regarding nonce loading success or failure.

  • It exposes properties like SDKVersion and delegate for accessing SDK information and managing delegate interactions, respectively.

PALNonceLoader


@interface PALNonceLoader : NSObject

Allows publishers to create a PALNonceManager for a single content stream.

This instance’s methods and properties are not thread safe. Usage:

  1. Create a new PALNonceLoader.
  2. Create a new PALNonceRequest and populate its properties.
  3. Call loadNonceManagerWithRequest: to get a new PALNonceManager, which will contain the nonce to use for ad requests for a single content stream.
  4. For subsequent content streams, create a new PALNonceRequest but reuse the same PALNonceLoader.
  • Initializes the nonce loader with default settings.

    Declaration

    Swift

    init()

    Objective-C

    - (nonnull instancetype)init;
  • Initializes the nonce loader

    Declaration

    Swift

    init(settings: PALSettings)

    Objective-C

    - (nonnull instancetype)initWithSettings:(nonnull PALSettings *)settings;

    Parameters

    settings

    The settings used by this loader.

  • Initializes the nonce loader, providing Google Ad Manager settings. This is only required if the settings for the Ad Manager network to which the nonce will be sent have been updated from the default. See {@link PALGoogleAdManagerSettings} for which settings can be updated.

    Declaration

    Swift

    init(settings: PALSettings, googleAdManagerSettings: PALGoogleAdManagerSettings)

    Objective-C

    - (nonnull instancetype)initWithSettings:(nonnull PALSettings *)settings
                     googleAdManagerSettings:(nonnull PALGoogleAdManagerSettings *)
                                                 googleAdManagerSettings;
  • The version of this SDK in major.minor.patch format, or “(null)” when unavailable.

    Declaration

    Swift

    var sdkVersion: String { get }

    Objective-C

    @property (nonatomic, readonly, nonnull) NSString *SDKVersion;
  • The object receiving PALNonceLoaderDelegate callbacks for this instance.

    Declaration

    Swift

    weak var delegate: (any NonceLoaderDelegate)? { get set }

    Objective-C

    @property (nonatomic, weak, nullable) id<PALNonceLoaderDelegate> delegate;
  • Asynchronously loads a PALNonceManager using the information in the given request, informing the delegate of success or failure.

    Multiple concurrent requests are supported.

    Declaration

    Swift

    func loadNonceManager(with request: PALNonceRequest)

    Objective-C

    - (void)loadNonceManagerWithRequest:(nonnull PALNonceRequest *)request;

    Parameters

    request

    The request containing information about the context in which the nonce will be used.