GoogleMobileAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GADNativeAdImage
@interface GADNativeAdImage : NSObject
Native ad image.
-
The image. If image autoloading is disabled, this property will be nil.
Declaration
Swift
var image: UIImage? { get }
Objective-C
@property (nonatomic, strong, readonly, nullable) UIImage *image;
-
Declaration
Swift
var imageURL: URL? { get }
Objective-C
@property (nonatomic, copy, readonly, nullable) NSURL *imageURL;
-
Declaration
Swift
var scale: CGFloat { get }
Objective-C
@property (nonatomic, readonly) CGFloat scale;
-
Initializes and returns a native ad image object with the provided image.
Declaration
Swift
init(image: UIImage)
Objective-C
- (nonnull instancetype)initWithImage:(nonnull UIImage *)image;
-
Initializes and returns a native ad image object with the provided image URL and image scale.
Declaration
Swift
init(url URL: URL, scale: CGFloat)
Objective-C
- (nonnull instancetype)initWithURL:(nonnull NSURL *)URL scale:(CGFloat)scale;
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\u003eGADNativeAdImage\u003c/code\u003e provides a way to access native ad images, including the actual image and its URL.\u003c/p\u003e\n"],["\u003cp\u003eIt includes properties like \u003ccode\u003eimage\u003c/code\u003e, \u003ccode\u003eimageURL\u003c/code\u003e, and \u003ccode\u003escale\u003c/code\u003e to represent the image data.\u003c/p\u003e\n"],["\u003cp\u003eYou can initialize a \u003ccode\u003eGADNativeAdImage\u003c/code\u003e instance either with a \u003ccode\u003eUIImage\u003c/code\u003e or with a \u003ccode\u003eURL\u003c/code\u003e and scale.\u003c/p\u003e\n"],["\u003cp\u003eIf image autoloading is disabled, the \u003ccode\u003eimage\u003c/code\u003e property will be \u003ccode\u003enil\u003c/code\u003e, and you'll need to use \u003ccode\u003eimageURL\u003c/code\u003e to fetch it.\u003c/p\u003e\n"]]],[],null,["GADNativeAdImage \n\n\n @interface GADNativeAdImage : NSObject\n\nNative ad image.\n- `\n ``\n ``\n `\n\n [image](#/c:objc(cs)GADNativeAdImage(py)image)`\n ` \n The image. If image autoloading is disabled, this property will be nil. \n\n Declaration \n Swift \n\n var image: UIImage? { get }\n\n Objective-C \n\n @property (nonatomic, strong, readonly, nullable) UIImage *image;\n\n- `\n ``\n ``\n `\n\n [imageURL](#/c:objc(cs)GADNativeAdImage(py)imageURL)`\n ` \n The image's URL. \n\n Declaration \n Swift \n\n var imageURL: URL? { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly, nullable) NSURL *imageURL;\n\n- `\n ``\n ``\n `\n\n [scale](#/c:objc(cs)GADNativeAdImage(py)scale)`\n ` \n The image's scale. \n\n Declaration \n Swift \n\n var scale: CGFloat { get }\n\n Objective-C \n\n @property (nonatomic, readonly) CGFloat scale;\n\n[MediationAdditions](#/MediationAdditions)\n\n- `\n ``\n ``\n `\n\n [-initWithImage:](#/c:objc(cs)GADNativeAdImage(im)initWithImage:)`\n ` \n Initializes and returns a native ad image object with the provided image. \n\n Declaration \n Swift \n\n init(image: UIImage)\n\n Objective-C \n\n - (nonnull instancetype)initWithImage:(nonnull UIImage *)image;\n\n- `\n ``\n ``\n `\n\n [-initWithURL:scale:](#/c:objc(cs)GADNativeAdImage(im)initWithURL:scale:)`\n ` \n Initializes and returns a native ad image object with the provided image URL and image scale. \n\n Declaration \n Swift \n\n init(url URL: URL, scale: CGFloat)\n\n Objective-C \n\n - (nonnull instancetype)initWithURL:(nonnull NSURL *)URL scale:(CGFloat)scale;"]]