Skip to content

Commit

Permalink
Snap - 1.0.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dravyan committed Feb 23, 2021
1 parent 104be6f commit 3eeeeba
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
3 changes: 3 additions & 0 deletions SnapAudienceNetwork/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion SnapAudienceNetwork/SnapAdAdapterConfiguration.m
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
8 changes: 2 additions & 6 deletions SnapAudienceNetwork/SnapAdInterstitialCustomEvent.m
Original file line number Diff line number Diff line change
Expand Up @@ -198,19 +198,15 @@ - (void)interstitialDidAppear:(SAKInterstitial *)ad
- (void)interstitialWillDisappear:(SAKInterstitial *)ad
{
MPLogAdEvent([MPLogEvent adWillDisappearForAdapter:NSStringFromClass(self.class)], [self getAdNetworkId]);
[self.delegate fullscreenAdAdapterAdWillDismiss:self];
[self.delegate fullscreenAdAdapterAdWillDisappear:self];
}

- (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
Expand Down
8 changes: 2 additions & 6 deletions SnapAudienceNetwork/SnapAdRewardedVideoCustomEvent.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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];
}

Expand Down

0 comments on commit 3eeeeba

Please sign in to comment.