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.
[null,null,["Last updated 2025-08-20 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eGADAdMetadataProvider\u003c/code\u003e protocol allows ads to provide metadata, giving insights into ad properties.\u003c/p\u003e\n"],["\u003cp\u003eAd metadata is accessible through the \u003ccode\u003eadMetadata\u003c/code\u003e property, which is a dictionary.\u003c/p\u003e\n"],["\u003cp\u003eTo get notified of any ad metadata changes, set the \u003ccode\u003eadMetadataDelegate\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;"]]