GoogleMobileAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
@protocol GADAdMetadataProvider <NSObject>
Protocol for ads that provide ad metadata.
-
The ad’s metadata. Use adMetadataDelegate to receive ad metadata change messages.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSDictionary< GADAdMetadataKey
, id> *adMetadata;
-
Delegate for receiving ad metadata changes.
Declaration
Swift
weak var adMetadataDelegate: (any AdMetadataDelegate)? { get set }
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\u003eThe \u003ccode\u003eGADAdMetadataProvider\u003c/code\u003e protocol allows ads to provide metadata, accessed through the \u003ccode\u003eadMetadata\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003eIt offers a \u003ccode\u003eadMetadataDelegate\u003c/code\u003e for receiving notifications about changes in the ad's metadata.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can access the ad metadata using keys defined in \u003ccode\u003eGADAdMetadataKey\u003c/code\u003e.\u003c/p\u003e\n"]]],["The `GADAdMetadataProvider` protocol enables ads to provide metadata. It defines two key properties: `adMetadata`, a read-only dictionary holding the ad's metadata, and `adMetadataDelegate`, a delegate used for receiving metadata change notifications. The `adMetadata` is a dictionary mapping metadata keys to values. The `adMetadataDelegate` is used to notify when the `adMetadata` is updated. These properties are available in both Swift and Objective-C.\n"],null,["# GoogleMobileAds Framework Reference\n\nGADAdMetadataProvider\n=====================\n\n @protocol GADAdMetadataProvider \u003cNSObject\u003e\n\nProtocol for ads that provide ad metadata.\n- `\n ``\n ``\n `\n\n ### [adMetadata](#/c:objc(pl)GADAdMetadataProvider(py)adMetadata)\n\n `\n ` \n The ad's metadata. Use adMetadataDelegate to receive ad metadata change messages. \n\n #### Declaration\n\n Swift \n\n var adMetadata: [../Type-Definitions.html#/c:GADAdMetadata.h@T@GADAdMetadataKey : Any]? { get }\n\n Objective-C \n\n @property (nonatomic, readonly, nullable) NSDictionary\u003c../Type-Definitions.html#/c:GADAdMetadata.h@T@GADAdMetadataKey, id\u003e *adMetadata;\n\n- `\n ``\n ``\n `\n\n ### [adMetadataDelegate](#/c:objc(pl)GADAdMetadataProvider(py)adMetadataDelegate)\n\n `\n ` \n Delegate for receiving ad metadata changes. \n\n #### Declaration\n\n Swift \n\n weak var adMetadataDelegate: (any AdMetadataDelegate)? { get set }\n\n Objective-C \n\n @property (nonatomic, weak, nullable) id\u003c../Protocols/GADAdMetadataDelegate.html\u003e adMetadataDelegate;"]]