# ProgrammaticAccessLibrary Framework Reference

# PALNonceLoader


    @interface PALNonceLoader : NSObject

Allows publishers to create a `https://developers.google.com/ad-manager/pal/tvos/reference/Classes/PALNonceManager.html` 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 `https://developers.google.com/ad-manager/pal/tvos/reference/Classes/PALNonceRequest.html` and populate its properties.
3. Call `loadNonceManagerWithRequest`: to get a new `https://developers.google.com/ad-manager/pal/tvos/reference/Classes/PALNonceManager.html`, which will contain the nonce to use for ad requests for a single content stream.
4. For subsequent content streams, create a new `https://developers.google.com/ad-manager/pal/tvos/reference/Classes/PALNonceRequest.html` but reuse the same `PALNonceLoader`.
- `


  ### [-init](https://developers.google.com/ad-manager/pal/tvos/reference/Classes/PALNonceLoader#/c:objc(cs)PALNonceLoader(im)init)


  ` Initializes the nonce loader with default settings.

  #### Declaration

  Swift

      init()

  Objective-C

      - (nonnull instancetype)init;

- `


  ### [-initWithSettings:](https://developers.google.com/ad-manager/pal/tvos/reference/Classes/PALNonceLoader#/c:objc(cs)PALNonceLoader(im)initWithSettings:)


  ` Initializes the nonce loader

  #### Declaration

  Swift

      init(settings: https://developers.google.com/ad-manager/pal/tvos/reference/Classes/PALSettings.html)

  Objective-C

      - (nonnull instancetype)initWithSettings:(nonnull https://developers.google.com/ad-manager/pal/tvos/reference/Classes/PALSettings.html *)settings;

  #### Parameters

  |---|---|
  | ` settings ` | The settings used by this loader. |

- `


  ### [-initWithSettings:googleAdManagerSettings:](https://developers.google.com/ad-manager/pal/tvos/reference/Classes/PALNonceLoader#/c:objc(cs)PALNonceLoader(im)initWithSettings:googleAdManagerSettings:)


  ` 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: https://developers.google.com/ad-manager/pal/tvos/reference/Classes/PALSettings.html, googleAdManagerSettings: https://developers.google.com/ad-manager/pal/tvos/reference/Classes/PALGoogleAdManagerSettings.html)

  Objective-C

      - (nonnull instancetype)initWithSettings:(nonnull https://developers.google.com/ad-manager/pal/tvos/reference/Classes/PALSettings.html *)settings
                       googleAdManagerSettings:(nonnull https://developers.google.com/ad-manager/pal/tvos/reference/Classes/PALGoogleAdManagerSettings.html *)
                                                   googleAdManagerSettings;

- `


  ### [SDKVersion](https://developers.google.com/ad-manager/pal/tvos/reference/Classes/PALNonceLoader#/c:objc(cs)PALNonceLoader(py)SDKVersion)


  ` 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;

- `


  ### [delegate](https://developers.google.com/ad-manager/pal/tvos/reference/Classes/PALNonceLoader#/c:objc(cs)PALNonceLoader(py)delegate)


  ` The object receiving `https://developers.google.com/ad-manager/pal/tvos/reference/Protocols/PALNonceLoaderDelegate.html` callbacks for this instance.

  #### Declaration

  Swift

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

  Objective-C

      @property (nonatomic, weak, nullable) id<https://developers.google.com/ad-manager/pal/tvos/reference/Protocols/PALNonceLoaderDelegate.html> delegate;

- `


  ### [-loadNonceManagerWithRequest:](https://developers.google.com/ad-manager/pal/tvos/reference/Classes/PALNonceLoader#/c:objc(cs)PALNonceLoader(im)loadNonceManagerWithRequest:)


  ` Asynchronously loads a `https://developers.google.com/ad-manager/pal/tvos/reference/Classes/PALNonceManager.html` 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: https://developers.google.com/ad-manager/pal/tvos/reference/Classes/PALNonceRequest.html)

  Objective-C

      - (void)loadNonceManagerWithRequest:(nonnull https://developers.google.com/ad-manager/pal/tvos/reference/Classes/PALNonceRequest.html *)request;

  #### Parameters

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