commit | author | age
|
96fe76
|
1 |
// |
L |
2 |
// GADCustomEventNativeAd.h |
|
3 |
// Google Mobile Ads SDK |
|
4 |
// |
|
5 |
// Copyright 2015 Google LLC. All rights reserved. |
|
6 |
// |
|
7 |
|
|
8 |
#import <Foundation/Foundation.h> |
|
9 |
#import <GoogleMobileAds/GADCustomEventRequest.h> |
|
10 |
|
|
11 |
@protocol GADCustomEventNativeAdDelegate; |
|
12 |
|
|
13 |
/// Native ad custom event protocol. Your native ad custom event handler class must conform to this |
|
14 |
/// protocol. |
|
15 |
GAD_DEPRECATED_MSG_ATTRIBUTE("Use GADMediationNativeAd and GADMediationAdapter instead.") |
|
16 |
@protocol GADCustomEventNativeAd <NSObject> |
|
17 |
|
|
18 |
/// Delegate object used for receiving custom native ad load request progress. |
|
19 |
@property(nonatomic, weak, nullable) id<GADCustomEventNativeAdDelegate> delegate; |
|
20 |
|
|
21 |
/// Returns an initialized custom event native ad. |
|
22 |
- (nonnull instancetype)init; |
|
23 |
|
|
24 |
/// Called when the custom event is scheduled to be executed. |
|
25 |
/// |
|
26 |
/// @param serverParameter A value configured in the mediation UI for the custom event. |
|
27 |
/// @param request Ad targeting information. |
|
28 |
/// @param adTypes List of requested native ad types. See GADAdLoaderAdTypes.h for available ad |
|
29 |
/// types. |
|
30 |
/// @param options Additional options configured by the publisher for requesting a native ad. See |
|
31 |
/// GADNativeAdImageAdLoaderOptions.h for available image options. |
|
32 |
/// @param rootViewController Publisher-provided view controller. |
|
33 |
- (void)requestNativeAdWithParameter:(nonnull NSString *)serverParameter |
|
34 |
request:(nonnull GADCustomEventRequest *)request |
|
35 |
adTypes:(nonnull NSArray *)adTypes |
|
36 |
options:(nonnull NSArray *)options |
|
37 |
rootViewController:(nonnull UIViewController *)rootViewController; |
|
38 |
|
|
39 |
/// Indicates whether the custom event handles user clicks. Return YES if the custom event should |
|
40 |
/// handle user clicks. In this case, the Google Mobile Ads SDK doesn't track user clicks and the |
|
41 |
/// custom event must notify the Google Mobile Ads SDK of clicks using |
|
42 |
/// +[GADMediatedNativeAdNotificationSource mediatedNativeAdDidRecordClick:]. Return NO if the |
|
43 |
/// custom event doesn't handles user clicks. In this case, the Google Mobile Ads SDK tracks user |
|
44 |
/// clicks itself and the custom event is notified of user clicks through |
|
45 |
/// -[GADMediatedUnifiedNativeAd didRecordClickOnAssetWithName:view:viewController:]. |
|
46 |
- (BOOL)handlesUserClicks; |
|
47 |
|
|
48 |
/// Indicates whether the custom event handles user impressions tracking. If this method returns |
|
49 |
/// YES, the Google Mobile Ads SDK will not track user impressions and the custom event must notify |
|
50 |
/// the Google Mobile Ads SDK of impressions using +[GADMediatedNativeAdNotificationSource |
|
51 |
/// mediatedNativeAdDidRecordImpression:]. If this method returns NO, the Google Mobile Ads SDK |
|
52 |
/// tracks user impressions and notifies the custom event of impressions using |
|
53 |
/// -[GADMediatedUnifiedNativeAd didRecordImpression]. |
|
54 |
- (BOOL)handlesUserImpressions; |
|
55 |
|
|
56 |
@end |