From 40838a2f0517d0a8370c7bba7bd88167459d2710 Mon Sep 17 00:00:00 2001 From: lpw Date: Tue, 15 Feb 2022 15:38:31 +0800 Subject: [PATCH] 3.9.7 --- frameworks/Chartboost.framework/Versions/A/Headers/CHBAdDelegate.h | 22 +++++++++++++++++----- 1 files changed, 17 insertions(+), 5 deletions(-) diff --git a/frameworks/Chartboost.framework/Versions/A/Headers/CHBAdDelegate.h b/frameworks/Chartboost.framework/Versions/A/Headers/CHBAdDelegate.h index 3ab197a..1f557c9 100644 --- a/frameworks/Chartboost.framework/Versions/A/Headers/CHBAdDelegate.h +++ b/frameworks/Chartboost.framework/Versions/A/Headers/CHBAdDelegate.h @@ -21,6 +21,10 @@ @brief The ad related to the event. */ @property (nonatomic, readonly) id<CHBAd> ad; +/*! + @brief A string that uniquely identifies the cached ad, updated when a cache operation ends. + */ +@property (nonatomic, readonly, nullable) NSString *adID; @end /*! @@ -47,7 +51,7 @@ @discussion This is the view controller you passed on the showFromViewController: call or a Chartboost ad view controller which was presented on top of it. If you called showFromViewController: passing a nil view controller this property will be nil too. You may use it to present your custom click confirmation gate if you implement the shouldConfirmClick:confirmationHandler: ad delegate method. */ -@property (nonatomic, readonly, nullable) UIViewController *viewController; +@property (nonatomic, readonly, nullable) UIViewController *viewController DEPRECATED_MSG_ATTRIBUTE("This property is deprecated and will be removed in a future version."); @end /*! @@ -55,6 +59,10 @@ @brief A CHBAdEvent subclass passed on dismiss-related delegate methods. */ @interface CHBDismissEvent : CHBAdEvent +/*! +@brief The error that forced the ad dismissal, or nil if the user (or the ad itself) chose to dismiss the ad. +*/ +@property (nonatomic, readonly, nullable) NSError *error; @end /*! @@ -192,7 +200,9 @@ @brief Called after a showFromViewController: call, either if the ad has been presented and an ad impression logged, or if the operation failed. @param event A show event with info related to the ad shown. @param error An error specifying the failure reason, or nil if the operation was successful. - @discussion Implement to be notified of when the ad presentation process has finished. Note that this method may be called more than once if some error occurs after the ad has been successfully shown. + @discussion Implement to be notified of when the ad presentation process has finished. + This method will be called once for each call to showFromViewController: on an interstitial or rewarded ad. + In contrast, this may be called multiple times after showing a banner, either if some error occurs after the ad has been successfully shown or as a result of the banner's automatic content refresh. A common practice consists of caching an ad here so there's an ad ready for the next time you need to show it. Note that this is not necessary for banners with automaticallyRefreshesContent set to YES. @@ -221,7 +231,7 @@ A typical implementation would look like this: @code - - (BOOL)shouldConfirmClick:(CHBClickEvent *)event confirmationHandler:(void(^)(BOOL))confirmationHandler + - (BOOL)shouldConfirmClick:(CHBClickEvent *)event confirmationHandler:(void(^)(BOOL))confirmationHandler { if (self.needsClickConfirmation) { MyAwesomeAgeGate *ageGate = [[MyAwesomeAgeGate alloc] initWithCompletion:^(BOOL confirmed) { [ageGate dismissViewControllerAnimated:YES completion:^{ @@ -236,7 +246,7 @@ } @endcode */ -- (BOOL)shouldConfirmClick:(CHBClickEvent *)event confirmationHandler:(void(^)(BOOL))confirmationHandler; +- (BOOL)shouldConfirmClick:(CHBClickEvent *)event confirmationHandler:(void(^)(BOOL))confirmationHandler DEPRECATED_MSG_ATTRIBUTE("This method is deprecated and will be removed in a future version."); /*! @brief Called after an ad has been clicked. @@ -289,10 +299,12 @@ @brief Called after an ad is dismissed. @param event A dismiss event with info related to the dismissed ad. @discussion Implement to be notified of when an ad is no longer displayed. + Note that this method won't get called for ads that failed to be shown. To handle that case implement didShowAd:error: + You may use the error property inside the event to know if the dismissal was expected or caused by an error. A typical implementation would look like this: @code - - (void)didDismissAd:(CHBCacheEvent *)event { + - (void)didDismissAd:(CHBDismissEvent *)event { // Resume processes paused in willShowAd: } @endcode -- Gitblit v1.8.0