Skip to content

Commit

Permalink
Verve/2.18.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins committed May 25, 2023
1 parent c95e79b commit ff8cf87
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Verve/AppLovinMediationVerveAdapter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Pod::Spec.new do |s|

s.authors = 'AppLovin Corporation'
s.name = 'AppLovinMediationVerveAdapter'
s.version = '2.18.1.0'
s.version = '2.18.1.1'
s.platform = :ios, '10.0'
s.summary = 'Verve adapter used for mediation with the AppLovin MAX SDK'
s.homepage = "https://github.com/CocoaPods/Specs/search?o=desc&q=#{s.name}&s=indexed"
Expand Down
3 changes: 3 additions & 0 deletions Verve/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 2.18.1.1
* Add support for binary consent state as a fallback option if the TCFv2 GDPR consent string is not present in User Defaults.

## 2.18.1.0
* Certified with Verve SDK 2.18.1.
* Remove unnecessary MAX SDK version check.
Expand Down
21 changes: 16 additions & 5 deletions Verve/VerveAdapter/ALVerveMediationAdapter.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#import <HyBid.h>
#import <HyBid-Generated-Interace-Swift.h>

#define ADAPTER_VERSION @"2.18.1.0"
#define ADAPTER_VERSION @"2.18.1.1"

@interface ALVerveMediationAdapterInterstitialAdDelegate : NSObject <HyBidInterstitialAdDelegate>
@property (nonatomic, weak) ALVerveMediationAdapter *parentAdapter;
Expand Down Expand Up @@ -292,15 +292,26 @@ - (void)updateLocationCollectionEnabled:(id<MAAdapterParameters>)parameters
- (void)updateConsentWithParameters:(id<MAAdapterParameters>)parameters
{
// From PubNative: "HyBid SDK is TCF v2 compliant, so any change in the IAB consent string will be picked up by the SDK."
// Because of this, they requested that we don't update consent values if one is already set.
// Because of this, they requested that we don't update consent values if one is already set and use binary consent state as a fallback.
// As a side effect, pubs that use the MAX consent flow will not be able to update consent values mid-session.
// Full context in this PR: https://github.com/AppLovin/AppLovin-MAX-SDK-iOS/pull/57

NSNumber *hasUserConsent = parameters.hasUserConsent;
NSString *verveGDPRConsentString = [[HyBidUserDataManager sharedInstance] getIABGDPRConsentString];
if ( hasUserConsent && (!verveGDPRConsentString || [verveGDPRConsentString isEqualToString: @""]) )
if ( hasUserConsent )
{
[[HyBidUserDataManager sharedInstance] setIABGDPRConsentString: hasUserConsent.boolValue ? @"1" : @"0"];
// NOTE: verveGDPRConsentString can be nil, TCFv2 consent string, "1" or "0"
NSString *verveGDPRConsentString = [[HyBidUserDataManager sharedInstance] getIABGDPRConsentString];

// If hasUserConsent is set to false, set consent string to "0"
if ( !hasUserConsent.boolValue )
{
[[HyBidUserDataManager sharedInstance] setIABGDPRConsentString: @"0"];
}
// If hasUserConsent is set to true, only override if it has not been set to a TCFv2 consent string or is set to "0"
else if ( ![verveGDPRConsentString al_isValidString] || [verveGDPRConsentString isEqualToString: @"0"] )
{
[[HyBidUserDataManager sharedInstance] setIABGDPRConsentString: @"1"];
}
}

NSNumber *isAgeRestrictedUser = parameters.ageRestrictedUser;
Expand Down

0 comments on commit ff8cf87

Please sign in to comment.