GoogleMobileAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GADSignalRequest
@interface GADSignalRequest : NSObject <NSCopying>
A signal request that can be used as input in server-to-server signal generation.
-
Ad networks may have additional parameters they accept. To pass these parameters to them, create
the ad network extras object for that network, fill in the parameters, and register it here. The
ad network should have a header defining the interface for the ‘extras’ object to create. All
networks will have access to the basic settings you’ve set in this GADRequest. If you register
an extras object that is the same class as one you have registered before, the previous extras
will be overwritten.
Declaration
Swift
func register(_ extras: any AdNetworkExtras)
-
Returns the network extras defined for an ad network.
Declaration
Swift
func adNetworkExtras(for aClass: any AdNetworkExtras.Type) -> (any AdNetworkExtras)?
-
Removes the extras for an ad network. |aClass| is the class which represents that network’s
extras type.
Declaration
Swift
func removeAdNetworkExtras(for aClass: any AdNetworkExtras.Type)
-
Scene object. Used in multiscene apps to request ads of the appropriate size. If this is nil,
uses the application’s key window scene.
Declaration
Swift
weak var scene: UIWindowScene? { get set }
Objective-C
@property (nonatomic, weak, nullable) UIWindowScene *scene;
-
Array of keyword strings. Keywords are words or phrases describing the current user activity
such as @“Sports Scores” or @“Football”. Set this property to nil to clear the keywords.
Declaration
Swift
var keywords: [String]? { get set }
Objective-C
@property (nonatomic, copy, nullable) NSArray<NSString *> *keywords;
-
URL string for a webpage whose content matches the app’s primary content. This webpage content
is used for targeting and brand safety purposes.
Declaration
Swift
var contentURL: String? { get set }
Objective-C
@property (nonatomic, copy, nullable) NSString *contentURL;
-
URL strings for non-primary web content near an ad. Promotes brand safety and allows displayed
ads to have an app level rating (MA, T, PG, etc) that is more appropriate to neighboring
content.
Declaration
Swift
var neighboringContentURLs: [String]? { get set }
Objective-C
@property (nonatomic, copy, nullable) NSArray<NSString *> *neighboringContentURLStrings;
-
String that identifies the ad request’s origin. Third party libraries that reference the Mobile
Ads SDK should set this property to denote the platform from which the ad request originated.
For example, a third party ad network called “CoolAds network” that is mediating requests to the
Mobile Ads SDK should set this property as “CoolAds”.
Declaration
Swift
var requestAgent: String? { get set }
Objective-C
@property (nonatomic, copy, nullable) NSString *requestAgent;
-
Declaration
Swift
var publisherProvidedID: String? { get set }
Objective-C
@property (nonatomic, copy, nullable) NSString *publisherProvidedID;
-
Array of strings used to exclude specified categories in ad results.
Declaration
Swift
var categoryExclusions: [String]? { get set }
Objective-C
@property (nonatomic, copy, nullable) NSArray<NSString *> *categoryExclusions;
-
Key-value pairs used for custom targeting.
Declaration
Swift
var customTargeting: [String : Any]? { get set }
Objective-C
@property (nonatomic, copy, nullable) NSDictionary<NSString *, id> *customTargeting;
-
The ad unit ID representing the placement in your app that will render the requested ad.
Create a new ad unit for every unique placement for improved targeting and reporting.
Declaration
Swift
var adUnitID: String? { get set }
Objective-C
@property (nonatomic, copy, nullable) NSString *adUnitID;
-
Initialization is only available from a subclass.
Declaration
Objective-C
- (nonnull instancetype)init;
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eGADSignalRequest\u003c/code\u003e objects are used as input for server-to-server signal generation to request ads.\u003c/p\u003e\n"],["\u003cp\u003eYou can provide contextual information such as keywords and content URLs for better ad targeting.\u003c/p\u003e\n"],["\u003cp\u003eAd network extras can be registered to allow ad networks to receive additional parameters.\u003c/p\u003e\n"],["\u003cp\u003ePublisher provided IDs, category exclusions, and custom targeting options are available for refining ad requests.\u003c/p\u003e\n"],["\u003cp\u003eAn ad unit ID is required to identify the placement within your app where the ad will be rendered.\u003c/p\u003e\n"]]],["GADSignalRequest facilitates server-to-server signal generation. It allows registering, retrieving, and removing ad network extras using `registerAdNetworkExtras:`, `adNetworkExtrasFor:`, and `removeAdNetworkExtrasFor:`. It supports contextual targeting through `keywords`, `contentURL`, and `neighboringContentURLStrings`. Additionally, `requestAgent` identifies the ad request's origin, and `publisherProvidedID`, `categoryExclusions`, and `customTargeting` offer optional targeting parameters. Finally, `adUnitID` defines the ad placement, and `scene` specifies the context for multiscene apps.\n"],null,["# GoogleMobileAds Framework Reference\n\nGADSignalRequest\n================\n\n\n @interface GADSignalRequest : NSObject \u003cNSCopying\u003e\n\nA signal request that can be used as input in server-to-server signal generation.\n[Additional Parameters For Ad Networks\n-------------------------------------](#/Additional-Parameters-For-Ad-Networks)\n\n- `\n ``\n ``\n `\n\n ### [-registerAdNetworkExtras:](#/c:objc(cs)GADSignalRequest(im)registerAdNetworkExtras:)\n\n `\n ` \n Ad networks may have additional parameters they accept. To pass these parameters to them, create\n the ad network extras object for that network, fill in the parameters, and register it here. The\n ad network should have a header defining the interface for the 'extras' object to create. All\n networks will have access to the basic settings you've set in this GADRequest. If you register\n an extras object that is the same class as one you have registered before, the previous extras\n will be overwritten. \n\n #### Declaration\n\n Swift \n\n func register(_ extras: any AdNetworkExtras)\n\n Objective-C \n\n - (void)registerAdNetworkExtras:(nonnull id\u003c../Protocols.html#/c:objc(pl)GADAdNetworkExtras\u003e)extras;\n\n- `\n ``\n ``\n `\n\n ### [-adNetworkExtrasFor:](#/c:objc(cs)GADSignalRequest(im)adNetworkExtrasFor:)\n\n `\n ` \n Returns the network extras defined for an ad network. \n\n #### Declaration\n\n Swift \n\n func adNetworkExtras(for aClass: any AdNetworkExtras.Type) -\u003e (any AdNetworkExtras)?\n\n Objective-C \n\n - (nullable id\u003c../Protocols.html#/c:objc(pl)GADAdNetworkExtras\u003e)adNetworkExtrasFor:\n (nonnull Class\u003c../Protocols.html#/c:objc(pl)GADAdNetworkExtras\u003e)aClass;\n\n- `\n ``\n ``\n `\n\n ### [-removeAdNetworkExtrasFor:](#/c:objc(cs)GADSignalRequest(im)removeAdNetworkExtrasFor:)\n\n `\n ` \n Removes the extras for an ad network. \\|aClass\\| is the class which represents that network's\n extras type. \n\n #### Declaration\n\n Swift \n\n func removeAdNetworkExtras(for aClass: any AdNetworkExtras.Type)\n\n Objective-C \n\n - (void)removeAdNetworkExtrasFor:(nonnull Class\u003c../Protocols.html#/c:objc(pl)GADAdNetworkExtras\u003e)aClass;\n\n[Publisher Provided\n------------------](#/Publisher-Provided)\n\n- `\n ``\n ``\n `\n\n ### [scene](#/c:objc(cs)GADSignalRequest(py)scene)\n\n `\n ` \n Scene object. Used in multiscene apps to request ads of the appropriate size. If this is nil,\n uses the application's key window scene. \n\n #### Declaration\n\n Swift \n\n weak var scene: UIWindowScene? { get set }\n\n Objective-C \n\n @property (nonatomic, weak, nullable) UIWindowScene *scene;\n\n[Contextual Information\n----------------------](#/Contextual-Information)\n\n- `\n ``\n ``\n `\n\n ### [keywords](#/c:objc(cs)GADSignalRequest(py)keywords)\n\n `\n ` \n Array of keyword strings. Keywords are words or phrases describing the current user activity\n such as @\"Sports Scores\" or @\"Football\". Set this property to nil to clear the keywords. \n\n #### Declaration\n\n Swift \n\n var keywords: [String]? { get set }\n\n Objective-C \n\n @property (nonatomic, copy, nullable) NSArray\u003cNSString *\u003e *keywords;\n\n- `\n ``\n ``\n `\n\n ### [contentURL](#/c:objc(cs)GADSignalRequest(py)contentURL)\n\n `\n ` \n URL string for a webpage whose content matches the app's primary content. This webpage content\n is used for targeting and brand safety purposes. \n\n #### Declaration\n\n Swift \n\n var contentURL: String? { get set }\n\n Objective-C \n\n @property (nonatomic, copy, nullable) NSString *contentURL;\n\n- `\n ``\n ``\n `\n\n ### [neighboringContentURLStrings](#/c:objc(cs)GADSignalRequest(py)neighboringContentURLStrings)\n\n `\n ` \n URL strings for non-primary web content near an ad. Promotes brand safety and allows displayed\n ads to have an app level rating (MA, T, PG, etc) that is more appropriate to neighboring\n content. \n\n #### Declaration\n\n Swift \n\n var neighboringContentURLs: [String]? { get set }\n\n Objective-C \n\n @property (nonatomic, copy, nullable) NSArray\u003cNSString *\u003e *neighboringContentURLStrings;\n\n[Request Agent Information\n-------------------------](#/Request-Agent-Information)\n\n- `\n ``\n ``\n `\n\n ### [requestAgent](#/c:objc(cs)GADSignalRequest(py)requestAgent)\n\n `\n ` \n String that identifies the ad request's origin. Third party libraries that reference the Mobile\n Ads SDK should set this property to denote the platform from which the ad request originated.\n For example, a third party ad network called \"CoolAds network\" that is mediating requests to the\n Mobile Ads SDK should set this property as \"CoolAds\". \n\n #### Declaration\n\n Swift \n\n var requestAgent: String? { get set }\n\n Objective-C \n\n @property (nonatomic, copy, nullable) NSString *requestAgent;\n\n[Optional Targeting Information\n------------------------------](#/Optional-Targeting-Information)\n\n- `\n ``\n ``\n `\n\n ### [publisherProvidedID](#/c:objc(cs)GADSignalRequest(py)publisherProvidedID)\n\n `\n ` \n Publisher provided ID. \n\n #### Declaration\n\n Swift \n\n var publisherProvidedID: String? { get set }\n\n Objective-C \n\n @property (nonatomic, copy, nullable) NSString *publisherProvidedID;\n\n- `\n ``\n ``\n `\n\n ### [categoryExclusions](#/c:objc(cs)GADSignalRequest(py)categoryExclusions)\n\n `\n ` \n Array of strings used to exclude specified categories in ad results. \n\n #### Declaration\n\n Swift \n\n var categoryExclusions: [String]? { get set }\n\n Objective-C \n\n @property (nonatomic, copy, nullable) NSArray\u003cNSString *\u003e *categoryExclusions;\n\n- `\n ``\n ``\n `\n\n ### [customTargeting](#/c:objc(cs)GADSignalRequest(py)customTargeting)\n\n `\n ` \n Key-value pairs used for custom targeting. \n\n #### Declaration\n\n Swift \n\n var customTargeting: [String : Any]? { get set }\n\n Objective-C \n\n @property (nonatomic, copy, nullable) NSDictionary\u003cNSString *, id\u003e *customTargeting;\n\n[Ad Unit ID\n----------](#/Ad-Unit-ID)\n\n- `\n ``\n ``\n `\n\n ### [adUnitID](#/c:objc(cs)GADSignalRequest(py)adUnitID)\n\n `\n ` \n The ad unit ID representing the placement in your app that will render the requested ad.\n Create a new ad unit for every unique placement for improved targeting and reporting. \n\n #### Declaration\n\n Swift \n\n var adUnitID: String? { get set }\n\n Objective-C \n\n @property (nonatomic, copy, nullable) NSString *adUnitID;\n\n[Initialization\n--------------](#/Initialization)\n\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)GADSignalRequest(im)init)\n\n `\n ` \n Unavailable \n Initialization is only available from a subclass. \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)init;"]]