GoogleMobileAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GADNativeSignalRequest
A native signal request that can be used as input in server-to-server signal generation.
-
Number of ads to request. By default, numberOfAds
is one. Requests are invalid and will fail if numberOfAds is less than one. If numberOfAds
exceeds the maximum limit (5), only the maximum number of ads are requested.
Declaration
Swift
var numberOfAds: Int { get set }
Objective-C
@property (nonatomic) NSInteger numberOfAds;
-
Indicates whether image asset content should be loaded by the SDK. If set to YES, the SDK will
disable image asset loading and native ad image URLs can be used to fetch content. Defaults to
NO, image assets are loaded by the SDK.
Declaration
Swift
var isImageLoadingDisabled: Bool { get set }
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite,
getter=isImageLoadingDisabled) BOOL disableImageLoading;
-
Indicates whether multiple images should be loaded for each asset. Defaults to NO.
Declaration
Swift
var shouldRequestMultipleImages: Bool { get set }
Objective-C
@property (nonatomic) BOOL shouldRequestMultipleImages;
-
Image and video aspect ratios. Portrait, landscape, and
square aspect ratios are returned when this property is GADMediaAspectRatioUnknown or
GADMediaAspectRatioAny. Defaults to GADMediaAspectRatioUnknown.
Declaration
Swift
var mediaAspectRatio: MediaAspectRatio { get set }
-
Indicates preferred location of AdChoices icon. Default is GADAdChoicesPositionTopRightCorner.
Declaration
Swift
var preferredAdChoicesPosition: AdChoicesPosition { get set }
-
Indicates whether the custom Mute This Ad feature is requested. Defaults to NO.
Declaration
Swift
var isCustomMuteThisAdRequested: Bool { get set }
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite,
getter=isCustomMuteThisAdRequested) BOOL customMuteThisAdRequested;
-
Indicates whether the publisher will record impressions manually when the ad becomes visible to
the user. Defaults to NO.
Declaration
Swift
var enableManualImpressions: Bool { get set }
Objective-C
@property (nonatomic) BOOL enableManualImpressions;
-
Enable the direction for detecting swipe gestures and counting them as clicks, and
whether tap gestures are also allowed on the ad. By default, swipe gestures are disabled.
Available for allowlisted publishers only. Settings will be ignored for publishers not
allowlisted.
Declaration
Swift
func enableSwipeGestureDirection(_ direction: UISwipeGestureRecognizer.Direction, tapsAllowed: Bool)
Objective-C
- (void)enableSwipeGestureDirection:(UISwipeGestureRecognizerDirection)direction
tapsAllowed:(BOOL)tapsAllowed;
-
Video ad options. Defaults to nil.
Declaration
Swift
@NSCopying var videoOptions: VideoOptions? { get set }
Objective-C
@property (nonatomic, copy, nullable) GADVideoOptions *videoOptions;
-
Array of NSValue encoded GADAdSize structs, specifying all valid sizes that are
appropriate for this slot. Never create your own GADAdSize directly. Use one of the predefined
standard ad sizes (such as GADAdSizeBanner), or create one using the GADAdSizeFromCGSize
method.
Example:
\code
NSArray *adSizes = @[
NSValueFromGADAdSize(GADAdSizeBanner),
NSValueFromGADAdSize(GADAdSizeLargeBanner)
];
signalRequest.adSizes = adSizes;
\endcode
Declaration
Swift
var adSizes: [NSValue]? { get set }
Objective-C
@property (nonatomic, copy, nullable) NSArray<NSValue *> *adSizes;
-
Set of ad loader ad types. See GADAdLoaderAdTypes.h for available ad loader ad types.
Declaration
Swift
var adLoaderAdTypes: Set<AdLoaderAdType>? { get set }
Objective-C
@property (nonatomic, copy, nullable) NSSet<GADAdLoaderAdType> *adLoaderAdTypes;
-
Array of custom native ad format IDs.
Declaration
Swift
var customNativeAdFormatIDs: [String]? { get set }
Objective-C
@property (nonatomic, copy, nullable) NSArray<NSString *> *customNativeAdFormatIDs;
-
Returns an initialized native signal request.
Declaration
Swift
init(signalType: String)
Objective-C
- (nonnull instancetype)initWithSignalType:(nonnull NSString *)signalType;
Parameters
signalType
|
The type of signal to request.
|
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\u003eGADNativeSignalRequest\u003c/code\u003e is used for server-to-server signal generation for native ads, allowing publishers to request ad signals from Google's ad servers.\u003c/p\u003e\n"],["\u003cp\u003eIt provides options to customize the ad request, including the number of ads, image loading behavior, aspect ratios, and ad choices positioning.\u003c/p\u003e\n"],["\u003cp\u003ePublishers can specify whether to enable manual impression recording and swipe gestures for interactions with the ad.\u003c/p\u003e\n"],["\u003cp\u003eIt supports various ad formats, such as video ads, custom native ad formats, and standard ad sizes.\u003c/p\u003e\n"],["\u003cp\u003eThe request must be initialized with a specific signal type to indicate the desired ad format or content.\u003c/p\u003e\n"]]],[],null,["GADNativeSignalRequest \n\n\n @interface GADNativeSignalRequest : ../Classes/GADSignalRequest.html\n\nA native signal request that can be used as input in server-to-server signal generation.\n- `\n ``\n ``\n `\n\n [numberOfAds](#/c:objc(cs)GADNativeSignalRequest(py)numberOfAds)`\n ` \n Number of ads to request. By default, numberOfAds\n is one. Requests are invalid and will fail if numberOfAds is less than one. If numberOfAds\n exceeds the maximum limit (5), only the maximum number of ads are requested. \n\n Declaration \n Swift \n\n var numberOfAds: Int { get set }\n\n Objective-C \n\n @property (nonatomic) NSInteger numberOfAds;\n\n- `\n ``\n ``\n `\n\n [disableImageLoading](#/c:objc(cs)GADNativeSignalRequest(py)disableImageLoading)`\n ` \n Indicates whether image asset content should be loaded by the SDK. If set to YES, the SDK will\n disable image asset loading and native ad image URLs can be used to fetch content. Defaults to\n NO, image assets are loaded by the SDK. \n\n Declaration \n Swift \n\n var isImageLoadingDisabled: Bool { get set }\n\n Objective-C \n\n @property (nonatomic, assign, unsafe_unretained, readwrite,\n getter=isImageLoadingDisabled) BOOL disableImageLoading;\n\n- `\n ``\n ``\n `\n\n [shouldRequestMultipleImages](#/c:objc(cs)GADNativeSignalRequest(py)shouldRequestMultipleImages)`\n ` \n Indicates whether multiple images should be loaded for each asset. Defaults to NO. \n\n Declaration \n Swift \n\n var shouldRequestMultipleImages: Bool { get set }\n\n Objective-C \n\n @property (nonatomic) BOOL shouldRequestMultipleImages;\n\n- `\n ``\n ``\n `\n\n [mediaAspectRatio](#/c:objc(cs)GADNativeSignalRequest(py)mediaAspectRatio)`\n ` \n Image and video aspect ratios. Portrait, landscape, and\n square aspect ratios are returned when this property is GADMediaAspectRatioUnknown or\n GADMediaAspectRatioAny. Defaults to GADMediaAspectRatioUnknown. \n\n Declaration \n Swift \n\n var mediaAspectRatio: MediaAspectRatio { get set }\n\n Objective-C \n\n @property (nonatomic) ../Enums/GADMediaAspectRatio.html mediaAspectRatio;\n\n- `\n ``\n ``\n `\n\n [preferredAdChoicesPosition](#/c:objc(cs)GADNativeSignalRequest(py)preferredAdChoicesPosition)`\n ` \n Indicates preferred location of AdChoices icon. Default is GADAdChoicesPositionTopRightCorner. \n\n Declaration \n Swift \n\n var preferredAdChoicesPosition: AdChoicesPosition { get set }\n\n Objective-C \n\n @property (nonatomic) ../Enums/GADAdChoicesPosition.html preferredAdChoicesPosition;\n\n- `\n ``\n ``\n `\n\n [customMuteThisAdRequested](#/c:objc(cs)GADNativeSignalRequest(py)customMuteThisAdRequested)`\n ` \n Indicates whether the custom Mute This Ad feature is requested. Defaults to NO. \n\n Declaration \n Swift \n\n var isCustomMuteThisAdRequested: Bool { get set }\n\n Objective-C \n\n @property (nonatomic, assign, unsafe_unretained, readwrite,\n getter=isCustomMuteThisAdRequested) BOOL customMuteThisAdRequested;\n\n- `\n ``\n ``\n `\n\n [enableManualImpressions](#/c:objc(cs)GADNativeSignalRequest(py)enableManualImpressions)`\n ` \n Indicates whether the publisher will record impressions manually when the ad becomes visible to\n the user. Defaults to NO. \n\n Declaration \n Swift \n\n var enableManualImpressions: Bool { get set }\n\n Objective-C \n\n @property (nonatomic) BOOL enableManualImpressions;\n\n- `\n ``\n ``\n `\n\n [-enableSwipeGestureDirection:tapsAllowed:](#/c:objc(cs)GADNativeSignalRequest(im)enableSwipeGestureDirection:tapsAllowed:)`\n ` \n Enable the direction for detecting swipe gestures and counting them as clicks, and\n whether tap gestures are also allowed on the ad. By default, swipe gestures are disabled.\n\n Available for allowlisted publishers only. Settings will be ignored for publishers not\n allowlisted. \n\n Declaration \n Swift \n\n func enableSwipeGestureDirection(_ direction: UISwipeGestureRecognizer.Direction, tapsAllowed: Bool)\n\n Objective-C \n\n - (void)enableSwipeGestureDirection:(UISwipeGestureRecognizerDirection)direction\n tapsAllowed:(BOOL)tapsAllowed;\n\n- `\n ``\n ``\n `\n\n [videoOptions](#/c:objc(cs)GADNativeSignalRequest(py)videoOptions)`\n ` \n Video ad options. Defaults to nil. \n\n Declaration \n Swift \n\n @NSCopying var videoOptions: VideoOptions? { get set }\n\n Objective-C \n\n @property (nonatomic, copy, nullable) ../Classes/GADVideoOptions.html *videoOptions;\n\n- `\n ``\n ``\n `\n\n [adSizes](#/c:objc(cs)GADNativeSignalRequest(py)adSizes)`\n ` \n Array of NSValue encoded GADAdSize structs, specifying all valid sizes that are\n appropriate for this slot. Never create your own GADAdSize directly. Use one of the predefined\n standard ad sizes (such as GADAdSizeBanner), or create one using the GADAdSizeFromCGSize\n method.\n\n Example:\n\n \\\\code\n NSArray \\*adSizes = @\\[\n NSValueFromGADAdSize(GADAdSizeBanner),\n NSValueFromGADAdSize(GADAdSizeLargeBanner)\n \\];\n\n signalRequest.adSizes = adSizes;\n \\\\endcode \n\n Declaration \n Swift \n\n var adSizes: [NSValue]? { get set }\n\n Objective-C \n\n @property (nonatomic, copy, nullable) NSArray\u003cNSValue *\u003e *adSizes;\n\n- `\n ``\n ``\n `\n\n [adLoaderAdTypes](#/c:objc(cs)GADNativeSignalRequest(py)adLoaderAdTypes)`\n ` \n Set of ad loader ad types. See GADAdLoaderAdTypes.h for available ad loader ad types. \n\n Declaration \n Swift \n\n var adLoaderAdTypes: Set\u003cAdLoaderAdType\u003e? { get set }\n\n Objective-C \n\n @property (nonatomic, copy, nullable) NSSet\u003c../Type-Definitions.html#/c:GADAdLoaderAdTypes.h@T@GADAdLoaderAdType\u003e *adLoaderAdTypes;\n\n- `\n ``\n ``\n `\n\n [customNativeAdFormatIDs](#/c:objc(cs)GADNativeSignalRequest(py)customNativeAdFormatIDs)`\n ` \n Array of custom native ad format IDs. \n\n Declaration \n Swift \n\n var customNativeAdFormatIDs: [String]? { get set }\n\n Objective-C \n\n @property (nonatomic, copy, nullable) NSArray\u003cNSString *\u003e *customNativeAdFormatIDs;\n\n- `\n ``\n ``\n `\n\n [-initWithSignalType:](#/c:objc(cs)GADNativeSignalRequest(im)initWithSignalType:)`\n ` \n Returns an initialized native signal request. \n\n Declaration \n Swift \n\n init(signalType: String)\n\n Objective-C \n\n - (nonnull instancetype)initWithSignalType:(nonnull NSString *)signalType;\n\n Parameters\n\n |--------------------|--------------------------------|\n | ` `*signalType*` ` | The type of signal to request. |"]]