Skip to content

Commit

Permalink
CSJ/5.9.1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins committed Mar 15, 2024
1 parent eac98af commit c98051b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 47 deletions.
7 changes: 4 additions & 3 deletions CSJ/AppLovinMediationCSJAdapter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Pod::Spec.new do |s|

s.authors = 'AppLovin Corporation'
s.name = 'AppLovinMediationCSJAdapter'
s.version = '4.9.0.7.2'
s.platform = :ios, '10.0'
s.version = '5.9.1.6.0'
s.platform = :ios, '11.0'
s.summary = 'CSJ adapter used for mediation with the AppLovin MAX SDK'
s.homepage = "https://github.com/CocoaPods/Specs/search?o=desc&q=#{s.name}&s=indexed"
s.license =
Expand All @@ -26,8 +26,9 @@ s.source =

s.vendored_frameworks = "#{s.name}-#{s.version}/#{s.name}.xcframework"

s.dependency 'Ads-CN/BUAdSDK_Compatible', '= 4.9.0.7'
s.dependency 'Ads-CN/BUAdSDK', '= 5.9.1.6'
s.dependency 'AppLovinSDK'
s.swift_version = '5.0'

s.pod_target_xcconfig =
{
Expand Down
8 changes: 8 additions & 0 deletions CSJ/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 5.9.1.6.0
* Certified with ByteDance China SDK 5.9.1.6.
* Removed privacy APIs since they have been deprecated (https://www.csjplatform.com/supportcenter/5373).
* Removed `configuration.logLevel` since it has been deprecated in favor of sending relevant information via callbacks.
* Updated the dependency to `Ads-CN/BUAdSDK`.
* Updated minimum Xcode requirement to 14.1.
* Updated minimum iOS version to 11.0.

## 4.9.0.7.2
* Updated minimum Xcode requirement to 14.0.
* Fixed potential memory leaks by clearing delegates in `destroy:` method.
Expand Down
8 changes: 4 additions & 4 deletions CSJ/CSJAdapter.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -330,7 +330,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
ONLY_ACTIVE_ARCH = NO;
SDKROOT = iphoneos;
Expand All @@ -347,7 +347,7 @@
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = X8JXXK4FF5;
ENABLE_BITCODE = NO;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "$(inherited)";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -365,7 +365,7 @@
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = X8JXXK4FF5;
ENABLE_BITCODE = NO;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = "$(inherited)";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
41 changes: 1 addition & 40 deletions CSJ/CSJAdapter/ALCSJMediationAdapter.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import "ALCSJMediationAdapter.h"
#import <BUAdSDK/BUAdSDK.h>

#define ADAPTER_VERSION @"4.9.0.7.2"
#define ADAPTER_VERSION @"5.9.1.6.0"

@interface ALCSJInterstitialAdDelegate : NSObject <BUNativeExpressFullscreenVideoAdDelegate>
@property (nonatomic, weak) ALCSJMediationAdapter *parentAdapter;
Expand Down Expand Up @@ -114,12 +114,6 @@ - (void)initializeWithParameters:(id<MAAdapterInitializationParameters>)paramete

configuration.appLogoImage = [self appIconImage];

if ( [parameters isTesting] )
{
configuration.logLevel = BUAdSDKLogLevelDebug;
}

[self updateConsentWithParameters: parameters];
[BUAdSDKManager setUserExtData: [self createUserExtData: parameters]];

[BUAdSDKManager startWithAsyncCompletionHandler:^(BOOL success, NSError *error) {
Expand Down Expand Up @@ -200,8 +194,6 @@ - (void)collectSignalWithParameters:(id<MASignalCollectionParameters>)parameters
{
[self log: @"Collecting signal..."];

[self updateConsentWithParameters: parameters];

NSString *signal = [BUAdSDKManager getBiddingToken: nil];
[delegate didCollectSignal: signal];
}
Expand All @@ -214,8 +206,6 @@ - (void)loadInterstitialAdForParameters:(id<MAAdapterResponseParameters>)paramet
NSString *bidResponse = parameters.bidResponse;
[self log: @"Loading %@interstitial ad for slot id \"%@\"...", [bidResponse al_isValidString] ? @"bidding " : @"", slotId];

[self updateConsentWithParameters: parameters];

// Determine whether we allow streaming or not - allow by default
self.streaming = [parameters.serverParameters al_numberForKey: @"streaming" defaultValue: @(YES)].boolValue;

Expand Down Expand Up @@ -250,8 +240,6 @@ - (void)loadAppOpenAdForParameters:(id<MAAdapterResponseParameters>)parameters a
NSString *bidResponse = parameters.bidResponse;
[self log: @"Loading %@app open ad for slot id \"%@\"...", [bidResponse al_isValidString] ? @"bidding " : @"", slotId];

[self updateConsentWithParameters: parameters];

self.appOpenAd = [[BUSplashAd alloc] initWithSlotID: slotId adSize: [UIScreen mainScreen].bounds.size];
self.appOpenAdDelegate = [[ALCSJAppOpenSplashAdDelegate alloc] initWithParentAdapter: self slotId: slotId andNotify: delegate];
self.appOpenAd.delegate = self.appOpenAdDelegate;
Expand Down Expand Up @@ -283,8 +271,6 @@ - (void)loadRewardedAdForParameters:(id<MAAdapterResponseParameters>)parameters
NSString *bidResponse = parameters.bidResponse;
[self log: @"Loading %@rewarded ad for slot id \"%@\"...", [bidResponse al_isValidString] ? @"bidding " : @"", slotId];

[self updateConsentWithParameters: parameters];

// Determine whether we allow streaming or not - allow by default
self.streaming = [parameters.serverParameters al_numberForKey: @"streaming" defaultValue: @(YES)].boolValue;

Expand Down Expand Up @@ -325,8 +311,6 @@ - (void)loadAdViewAdForParameters:(id<MAAdapterResponseParameters>)parameters ad
NSString *bidResponse = parameters.bidResponse;
[self log: @"Loading %@%@%@ ad for slot id \"%@\"...", isNative ? @"native " : @"", [bidResponse al_isValidString] ? @"bidding " : @"", adFormat.label, slotId];

[self updateConsentWithParameters: parameters];

dispatchOnMainQueue(^{

if ( isNative )
Expand Down Expand Up @@ -383,8 +367,6 @@ - (void)loadNativeAdForParameters:(id<MAAdapterResponseParameters>)parameters an
NSString *bidResponse = parameters.bidResponse;
[self log: @"Loading %@native ad for slot id \"%@\"...", [bidResponse al_isValidString] ? @"bidding " : @"", slotId];

[self updateConsentWithParameters: parameters];

BUAdSlot *slot = [[BUAdSlot alloc] init];
slot.ID = slotId;
slot.AdType = BUAdSlotAdTypeFeed;
Expand Down Expand Up @@ -415,27 +397,6 @@ - (NSString *)createUserExtData:(id<MAAdapterParameters>)parameters
return [NSString stringWithFormat: @"[{\"name\":\"mediation\",\"value\":\"MAX\"},{\"name\":\"adapter_version\",\"value\":\"%@\"}]", self.adapterVersion];
}

- (void)updateConsentWithParameters:(id<MAAdapterParameters>)parameters
{
NSNumber *hasUserConsent = parameters.hasUserConsent;
if ( hasUserConsent )
{
BUAdSDKManager.GDPR = hasUserConsent.boolValue ? 1 : 0;
}

NSNumber *isAgeRestrictedUser = parameters.isAgeRestrictedUser;
if ( isAgeRestrictedUser )
{
BUAdSDKManager.coppa = isAgeRestrictedUser.boolValue ? 1 : 0;
}

NSNumber *isDoNotSell = parameters.isDoNotSell;
if ( isDoNotSell )
{
BUAdSDKManager.CCPA = isDoNotSell.boolValue ? 1 : 0;
}
}

- (void)loadImageForURLString:(NSString *)urlString group:(dispatch_group_t)group successHandler:(void (^)(UIImage *image))successHandler;
{
// Pangle's image resource comes in the form of a URL which needs to be fetched in a non-blocking manner
Expand Down

0 comments on commit c98051b

Please sign in to comment.