ProgrammaticAccessLibrary Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
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:
- Create a new
PALNonceLoader
.
- Create a new
PALNonceRequest
and populate its properties.
- Call
loadNonceManagerWithRequest
: to get a new PALNonceManager
,
which will contain the nonce to use for ad requests for a single content stream.
- For subsequent content streams, create a new
PALNonceRequest
but reuse the same
PALNonceLoader
.
-
Initializes the nonce loader with default settings.
Declaration
Objective-C
- (nonnull instancetype)init;
-
Initializes the nonce loader
Declaration
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.
-
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;
-
Declaration
Swift
weak var delegate: (any NonceLoaderDelegate)? { get set }
-
Asynchronously loads a PALNonceManager
using the information in
the given request, informing the delegate of success or failure.
Multiple concurrent requests are supported.
Declaration
Objective-C
- (void)loadNonceManagerWithRequest:(nonnull PALNonceRequest *)request;
Parameters
request
|
The request containing information about the context in which the nonce will be
used.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[null,null,["Last updated 2025-08-20 UTC."],[[["\u003cp\u003ePALNonceLoader enables publishers to create a PALNonceManager for individual content streams, facilitating ad requests.\u003c/p\u003e\n"],["\u003cp\u003eIt involves initializing the loader, creating a PALNonceRequest, and using \u003ccode\u003eloadNonceManagerWithRequest\u003c/code\u003e to obtain a PALNonceManager containing the nonce.\u003c/p\u003e\n"],["\u003cp\u003eThe same PALNonceLoader can be reused for subsequent content streams with new nonce requests.\u003c/p\u003e\n"],["\u003cp\u003ePALNonceLoader supports concurrent requests and provides delegate callbacks for success or failure notifications.\u003c/p\u003e\n"],["\u003cp\u003eIt exposes properties like \u003ccode\u003esdkVersion\u003c/code\u003e and \u003ccode\u003edelegate\u003c/code\u003e for accessing SDK version information and setting a delegate to receive callbacks.\u003c/p\u003e\n"]]],["`PALNonceLoader` facilitates the creation of `PALNonceManager` instances for content streams. Initialize `PALNonceLoader`, optionally with custom settings. Create a `PALNonceRequest` and set its properties. Call `loadNonceManagerWithRequest:` to get a `PALNonceManager` for a single content stream. Reuse the same `PALNonceLoader` for subsequent streams, but use new `PALNonceRequest`s. The `delegate` property receives callbacks, and `SDKVersion` provides the SDK version. The operations are not thread-safe.\n"],null,["# ProgrammaticAccessLibrary Framework Reference\n\nPALNonceLoader\n==============\n\n\n @interface PALNonceLoader : NSObject\n\nAllows publishers to create a [PALNonceManager](../Classes/PALNonceManager.html) for a single content stream.\n\nThis instance's methods and properties are not thread safe. Usage:\n\n1. Create a new `PALNonceLoader`.\n2. Create a new [PALNonceRequest](../Classes/PALNonceRequest.html) and populate its properties.\n3. Call `loadNonceManagerWithRequest`: to get a new [PALNonceManager](../Classes/PALNonceManager.html), which will contain the nonce to use for ad requests for a single content stream.\n4. For subsequent content streams, create a new [PALNonceRequest](../Classes/PALNonceRequest.html) but reuse the same `PALNonceLoader`.\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)PALNonceLoader(im)init)\n\n `\n ` \n Initializes the nonce loader with default settings. \n\n #### Declaration\n\n Swift \n\n init()\n\n Objective-C \n\n - (nonnull instancetype)init;\n\n- `\n ``\n ``\n `\n\n ### [-initWithSettings:](#/c:objc(cs)PALNonceLoader(im)initWithSettings:)\n\n `\n ` \n Initializes the nonce loader \n\n #### Declaration\n\n Swift \n\n init(settings: ../Classes/PALSettings.html)\n\n Objective-C \n\n - (nonnull instancetype)initWithSettings:(nonnull ../Classes/PALSettings.html *)settings;\n\n #### Parameters\n\n |------------------|-----------------------------------|\n | ` `*settings*` ` | The settings used by this loader. |\n\n- `\n ``\n ``\n `\n\n ### [-initWithSettings:googleAdManagerSettings:](#/c:objc(cs)PALNonceLoader(im)initWithSettings:googleAdManagerSettings:)\n\n `\n ` \n Initializes the nonce loader, providing Google Ad Manager settings. This is only required\n if the settings for the Ad Manager network to which the nonce will be sent have been updated\n from the default. See {@link PALGoogleAdManagerSettings} for which settings can be updated. \n\n #### Declaration\n\n Swift \n\n init(settings: ../Classes/PALSettings.html, googleAdManagerSettings: ../Classes/PALGoogleAdManagerSettings.html)\n\n Objective-C \n\n - (nonnull instancetype)initWithSettings:(nonnull ../Classes/PALSettings.html *)settings\n googleAdManagerSettings:(nonnull ../Classes/PALGoogleAdManagerSettings.html *)\n googleAdManagerSettings;\n\n- `\n ``\n ``\n `\n\n ### [SDKVersion](#/c:objc(cs)PALNonceLoader(py)SDKVersion)\n\n `\n ` \n The version of this SDK in major.minor.patch format, or \"(null)\" when unavailable. \n\n #### Declaration\n\n Swift \n\n var sdkVersion: String { get }\n\n Objective-C \n\n @property (nonatomic, readonly, nonnull) NSString *SDKVersion;\n\n- `\n ``\n ``\n `\n\n ### [delegate](#/c:objc(cs)PALNonceLoader(py)delegate)\n\n `\n ` \n The object receiving [PALNonceLoaderDelegate](../Protocols/PALNonceLoaderDelegate.html) callbacks for this instance. \n\n #### Declaration\n\n Swift \n\n weak var delegate: (any NonceLoaderDelegate)? { get set }\n\n Objective-C \n\n @property (nonatomic, weak, nullable) id\u003c../Protocols/PALNonceLoaderDelegate.html\u003e delegate;\n\n- `\n ``\n ``\n `\n\n ### [-loadNonceManagerWithRequest:](#/c:objc(cs)PALNonceLoader(im)loadNonceManagerWithRequest:)\n\n `\n ` \n Asynchronously loads a [PALNonceManager](../Classes/PALNonceManager.html) using the information in\n the given request, informing the delegate of success or failure.\n\n Multiple concurrent requests are supported. \n\n #### Declaration\n\n Swift \n\n func loadNonceManager(with request: ../Classes/PALNonceRequest.html)\n\n Objective-C \n\n - (void)loadNonceManagerWithRequest:(nonnull ../Classes/PALNonceRequest.html *)request;\n\n #### Parameters\n\n |-----------------|---------------------------------------------------------------------------------------|\n | ` `*request*` ` | The request containing information about the context in which the nonce will be used. |"]]