diff --git a/SnapAudienceNetwork/CHANGELOG.md b/SnapAudienceNetwork/CHANGELOG.md index 01e43708..74b2b6be 100644 --- a/SnapAudienceNetwork/CHANGELOG.md +++ b/SnapAudienceNetwork/CHANGELOG.md @@ -1,4 +1,7 @@ ## Changelog +* 1.0.7.2 + * Add support for `fullscreenAdAdapterAdWillDismiss` when a fullscreen creative is about to close. Publishers must use v5.16.1 of the MoPub SDK at the minimum. + * 1.0.7.1 * Service release. No new features/changes. diff --git a/SnapAudienceNetwork/SnapAdAdapterConfiguration.m b/SnapAudienceNetwork/SnapAdAdapterConfiguration.m index 14acb9bc..fdfc7c2a 100644 --- a/SnapAudienceNetwork/SnapAdAdapterConfiguration.m +++ b/SnapAudienceNetwork/SnapAdAdapterConfiguration.m @@ -5,7 +5,7 @@ @implementation SnapAdAdapterConfiguration static NSString * const kSAKAppId = @"appId"; static NSString * const kAdapterErrorDomain = @"com.mopub.mopub-ios-sdk.mopub-snapchat-adapters"; -NSString * const kMoPubSnapAdapterVersion = @"1.0.7.1"; +NSString * const kMoPubSnapAdapterVersion = @"1.0.7.2"; NSString * const kMoPubNetworkName = @"SnapAudienceNetwork"; typedef NS_ENUM(NSInteger, SAKAdapterErrorCode) { diff --git a/SnapAudienceNetwork/SnapAdInterstitialCustomEvent.m b/SnapAudienceNetwork/SnapAdInterstitialCustomEvent.m index d8be4f9b..e836ca0e 100644 --- a/SnapAudienceNetwork/SnapAdInterstitialCustomEvent.m +++ b/SnapAudienceNetwork/SnapAdInterstitialCustomEvent.m @@ -198,6 +198,7 @@ - (void)interstitialDidAppear:(SAKInterstitial *)ad - (void)interstitialWillDisappear:(SAKInterstitial *)ad { MPLogAdEvent([MPLogEvent adWillDisappearForAdapter:NSStringFromClass(self.class)], [self getAdNetworkId]); + [self.delegate fullscreenAdAdapterAdWillDismiss:self]; [self.delegate fullscreenAdAdapterAdWillDisappear:self]; } @@ -205,12 +206,7 @@ - (void)interstitialDidDisappear:(SAKInterstitial *)ad { MPLogAdEvent([MPLogEvent adDidDisappearForAdapter:NSStringFromClass(self.class)], [self getAdNetworkId]); [self.delegate fullscreenAdAdapterAdDidDisappear:self]; - - // Signal that the fullscreen ad is closing and the state should be reset. - // `fullscreenAdAdapterAdDidDismiss:` was introduced in MoPub SDK 5.15.0. - if ([self.delegate respondsToSelector:@selector(fullscreenAdAdapterAdDidDismiss:)]) { - [self.delegate fullscreenAdAdapterAdDidDismiss:self]; - } + [self.delegate fullscreenAdAdapterAdDidDismiss:self]; } - (void)interstitialDidTrackImpression:(SAKInterstitial *)ad diff --git a/SnapAudienceNetwork/SnapAdRewardedVideoCustomEvent.m b/SnapAudienceNetwork/SnapAdRewardedVideoCustomEvent.m index 47cd5d7a..3df86f25 100644 --- a/SnapAudienceNetwork/SnapAdRewardedVideoCustomEvent.m +++ b/SnapAudienceNetwork/SnapAdRewardedVideoCustomEvent.m @@ -139,12 +139,7 @@ - (void)rewardedAdDidDisappear:(nonnull SAKRewardedAd *)ad { MPLogAdEvent([MPLogEvent adDidDisappearForAdapter:NSStringFromClass(self.class)], self.slotId); [self.delegate fullscreenAdAdapterAdDidDisappear:self]; - - // Signal that the fullscreen ad is closing and the state should be reset. - // `fullscreenAdAdapterAdDidDismiss:` was introduced in MoPub SDK 5.15.0. - if ([self.delegate respondsToSelector:@selector(fullscreenAdAdapterAdDidDismiss:)]) { - [self.delegate fullscreenAdAdapterAdDidDismiss:self]; - } + [self.delegate fullscreenAdAdapterAdDidDismiss:self]; } - (void)rewardedAdDidEarnReward:(nonnull SAKRewardedAd *)ad @@ -189,6 +184,7 @@ - (void)rewardedAdWillAppear:(nonnull SAKRewardedAd *)ad - (void)rewardedAdWillDisappear:(nonnull SAKRewardedAd *)ad { MPLogAdEvent([MPLogEvent adWillDisappearForAdapter:NSStringFromClass(self.class)], self.slotId); + [self.delegate fullscreenAdAdapterAdWillDismiss:self]; [self.delegate fullscreenAdAdapterAdWillDisappear:self]; }