Skip to content

Commit

Permalink
add SDK Ver 6.38.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FluctMember committed Oct 31, 2024
1 parent c68a67c commit fd44555
Show file tree
Hide file tree
Showing 21 changed files with 178 additions and 46 deletions.
2 changes: 1 addition & 1 deletion FluctSDK-MediationAdapter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Pod::Spec.new do |s|
s.name = "FluctSDK-MediationAdapter"
s.summary = "Mediation Adapter for FluctSDK ad Framework"
s.license = { :type => "Copyright", :text => "Copyright (c) fluct,Inc. All rights reserved." }
s.version = "6.37.3"
s.version = "6.38.0"
s.author = "fluct,Inc."
s.requires_arc = true
s.static_framework = true
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
</data>
<key>Info.plist</key>
<data>
wWGoEZOVaq8DD2hlzfHhPj1lEPI=
oNDWbFcqFW7ZEynDG1dj4cxvzWw=
</data>
<key>Modules/module.modulemap</key>
<data>
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion FluctSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Pod::Spec.new do |s|
s.name = "FluctSDK"
s.summary = "FluctSDK ad Framework"
s.license = { :type => "Copyright", :text => "Copyright (c) fluct,Inc. All rights reserved." }
s.version = "6.37.3"
s.version = "6.38.0"
s.author = "fluct,Inc."
s.requires_arc = true
s.homepage = "https://fluct.jp/"
Expand Down
2 changes: 1 addition & 1 deletion GoogleMobileAdsMediationFluct.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Pod::Spec.new do |s|
s.name = "GoogleMobileAdsMediationFluct"
s.summary = "fluct adapter used for mediation with the Google Mobile Ads SDK"
s.license = { :type => "Copyright", :text => "Copyright (c) fluct,Inc. All rights reserved." }
s.version = "6.37.3"
s.version = "6.38.0"
s.author = "fluct,Inc."
s.requires_arc = true
s.static_framework = true
Expand Down
2 changes: 1 addition & 1 deletion MaxMediationAdapterFluct.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Pod::Spec.new do |s|
s.name = "MaxMediationAdapterFluct"
s.summary = "fluct adapter used for mediation with the AppLovin MAX SDK"
s.license = { :type => "Copyright", :text => "Copyright (c) fluct,Inc. All rights reserved." }
s.version = "6.37.3"
s.version = "6.38.0"
s.author = "fluct,Inc."
s.requires_arc = true
s.static_framework = true
Expand Down
20 changes: 20 additions & 0 deletions MaxMediationAdapterFluct/ALFluctAdViewAdapter.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// ALFluctAdViewAdapter.h
// MaxMediationAdapterFluct
//
//

#import "ALFluctMediationAdapter.h"
#import <AppLovinSDK/AppLovinSDK.h>
#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface ALFluctAdViewAdapter : NSObject
- (void)loadAdViewAdapterWithAdapter:(ALFluctMediationAdapter *)adapter
parameters:(id<MAAdapterResponseParameters>)parameters
adFormat:(MAAdFormat *)adFormat
andNotify:(id<MAAdViewAdapterDelegate>)delegate;
@end

NS_ASSUME_NONNULL_END
75 changes: 75 additions & 0 deletions MaxMediationAdapterFluct/ALFluctAdViewAdapter.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
//
// ALFluctAdViewAdapter.m
// MaxMediationAdapterFluct
//
//

#import "ALFluctAdViewAdapter.h"
#import "ALFluctMediationAdapterError.h"
#import "ALFluctMediationAdapterParam.h"
#import "ALFluctMediationAdapterUtility.h"
@import FluctSDK;

@interface ALFluctAdViewAdapter () <FSSAdViewDelegate>
@property (nonatomic, strong) FSSAdView *adView;
@property (nonatomic, weak) id<MAAdViewAdapterDelegate> delegate;
@property (nonatomic, weak) ALFluctMediationAdapter *parentAdapter;
@end

@implementation ALFluctAdViewAdapter
- (void)loadAdViewAdapterWithAdapter:(ALFluctMediationAdapter *)adapter
parameters:(id<MAAdapterResponseParameters>)parameters
adFormat:(MAAdFormat *)adFormat
andNotify:(id<MAAdViewAdapterDelegate>)delegate {
self.parentAdapter = adapter;
if (![ALFluctMediationAdapterUtility canDeliverAds:parameters]) {
[delegate didFailToLoadAdViewAdWithError:[ALFluctMediationAdapterError maxErrorFromFluctAdViewError:[NSError errorWithDomain:FSSBannerAdsSDKDomain
code:FSSAdViewErrorNoAds
userInfo:@{NSLocalizedDescriptionKey : @"FluctSDK dose not deliver ads to this user to comply with GDPR, CCPA"}]]];
return;
}
ALFluctMediationAdapterParam *param = [[ALFluctMediationAdapterParam alloc] initWithParameters:parameters useCustomParameters:NO];
[self.parentAdapter log:@"Loading AdView for group id: %@, unit id: %@", param.groupId, param.unitId];
if (!param) {
[delegate didFailToLoadAdViewAdWithError:[ALFluctMediationAdapterError maxErrorFromFluctAdViewError:[NSError errorWithDomain:FSSBannerAdsSDKDomain
code:FSSAdViewErrorBadRequest
userInfo:@{NSLocalizedDescriptionKey : @"FluctSDK dose not deliver ads to invalid group_id and/or unit_id"}]]];
return;
}
self.delegate = delegate;
self.adView = [[FSSAdView alloc] initWithGroupId:param.groupId
unitId:param.unitId
adSize:[ALFluctAdViewAdapter convertMAAdFormat:adFormat]];
self.adView.delegate = self;
[self.adView loadAd];
}

+ (FSSAdSize)convertMAAdFormat:(MAAdFormat *)adFormat {
FSSAdSize fssAdSize;
fssAdSize.size = adFormat.size;
return fssAdSize;
}

#pragma mark - FSSAdViewDelegate

- (void)adViewDidStoreAd:(FSSAdView *)adView {
[self.parentAdapter log:@"AdView did store for group id: %@, unit id: %@", adView.groupId, adView.unitId];
[self.delegate didLoadAdForAdView:adView];
__weak typeof(self) weakSelf = self;
// didDisplayが呼ばれない問題の対応のためdidDisplayAdViewAdを遅延実行しています
// 遅延時間が短いと正常にdidDisplayが呼ばれません
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 0.5 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
[weakSelf.delegate didDisplayAdViewAd];
});
}

- (void)adView:(FSSAdView *)adView didFailToStoreAdWithError:(NSError *)error {
[self.parentAdapter log:@"AdView failed to store for group id: %@, unit id: %@, error: %@", adView.groupId, adView.unitId, error];
[self.delegate didFailToLoadAdViewAdWithError:[ALFluctMediationAdapterError maxErrorFromFluctAdViewError:error]];
}

- (void)willLeaveApplicationForAdView:(FSSAdView *)adView {
[self.parentAdapter log:@"AdView will leave application for group id: %@, unit id: %@", adView.groupId, adView.unitId];
[self.delegate didClickAdViewAd];
}
@end
32 changes: 20 additions & 12 deletions MaxMediationAdapterFluct/ALFluctMediationAdapter.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
//

#import "ALFluctMediationAdapter.h"
#import "ALFluctAdViewAdapter.h"
#import "ALFluctMediationAdapterError.h"
#import "ALFluctMediationAdapterParam.h"
#import "ALFluctMediationAdapterUtility.h"
Expand All @@ -18,9 +19,8 @@ - (instancetype)initWithParentAdapter:(ALFluctMediationAdapter *)parentAdapter a
@end

@interface ALFluctMediationAdapter ()

@property (nonatomic, strong) ALFluctMediationAdapterRewardedVideoAdDelegate *rewardedAdapterDelegate;

@property (nonatomic, strong) ALFluctAdViewAdapter *adViewAdapter;
@end

@implementation ALFluctMediationAdapter
Expand Down Expand Up @@ -73,6 +73,14 @@ - (NSString *)adapterVersion {

- (void)destroy {
self.rewardedAdapterDelegate = nil;
self.adViewAdapter = nil;
}

#pragma mark - MAAdViewAdapter

- (void)loadAdViewAdForParameters:(nonnull id<MAAdapterResponseParameters>)parameters adFormat:(nonnull MAAdFormat *)adFormat andNotify:(nonnull id<MAAdViewAdapterDelegate>)delegate {
self.adViewAdapter = [[ALFluctAdViewAdapter alloc] init];
[self.adViewAdapter loadAdViewAdapterWithAdapter:self parameters:parameters adFormat:adFormat andNotify:delegate];
}

#pragma mark - MARewardedAdapter
Expand All @@ -81,17 +89,17 @@ - (void)loadRewardedAdForParameters:(nonnull id<MAAdapterResponseParameters>)par
andNotify:(nonnull id<MARewardedAdapterDelegate>)delegate {

if (![ALFluctMediationAdapterUtility canDeliverAds:parameters]) {
[delegate didFailToLoadRewardedAdWithError:[ALFluctMediationAdapterError maxErrorFromFluctError:[NSError errorWithDomain:FSSVideoErrorSDKDomain
code:FSSVideoErrorNoAds
userInfo:@{NSLocalizedDescriptionKey : @"FluctSDK dose not deliver ads to this user to comply with GDPR, CCPA"}]]];
[delegate didFailToLoadRewardedAdWithError:[ALFluctMediationAdapterError maxErrorFromFluctVideoError:[NSError errorWithDomain:FSSVideoErrorSDKDomain
code:FSSVideoErrorNoAds
userInfo:@{NSLocalizedDescriptionKey : @"FluctSDK dose not deliver ads to this user to comply with GDPR, CCPA"}]]];
return;
}
ALFluctMediationAdapterParam *param = [[ALFluctMediationAdapterParam alloc] initWithParameters:parameters];
ALFluctMediationAdapterParam *param = [[ALFluctMediationAdapterParam alloc] initWithParameters:parameters useCustomParameters:YES];
[self log:@"Loading rewarded ad for group id: %@, unit id: %@", param.groupId, param.unitId];
if (!param) {
[delegate didFailToLoadRewardedAdWithError:[ALFluctMediationAdapterError maxErrorFromFluctError:[NSError errorWithDomain:FSSVideoErrorSDKDomain
code:FSSVideoErrorBadRequest
userInfo:@{NSLocalizedDescriptionKey : @"FluctSDK dose not deliver ads to invalid group_id and/or unit_id"}]]];
[delegate didFailToLoadRewardedAdWithError:[ALFluctMediationAdapterError maxErrorFromFluctVideoError:[NSError errorWithDomain:FSSVideoErrorSDKDomain
code:FSSVideoErrorBadRequest
userInfo:@{NSLocalizedDescriptionKey : @"FluctSDK dose not deliver ads to invalid group_id and/or unit_id"}]]];
return;
}

Expand All @@ -111,7 +119,7 @@ - (void)loadRewardedAdForParameters:(nonnull id<MAAdapterResponseParameters>)par

- (void)showRewardedAdForParameters:(nonnull id<MAAdapterResponseParameters>)parameters
andNotify:(nonnull id<MARewardedAdapterDelegate>)delegate {
ALFluctMediationAdapterParam *param = [[ALFluctMediationAdapterParam alloc] initWithParameters:parameters];
ALFluctMediationAdapterParam *param = [[ALFluctMediationAdapterParam alloc] initWithParameters:parameters useCustomParameters:YES];

[self log:@"Showing rewarded ad for group id: %@, unit id: %@", param.groupId, param.unitId];

Expand Down Expand Up @@ -151,7 +159,7 @@ - (void)rewardedVideoDidFailToLoadForGroupId:(NSString *)groupId
unitId:(NSString *)unitId
error:(NSError *)error {
[self.parentAdapter log:@"Rewarded ad failed to load for group id: %@, unit id: %@, error: %@", groupId, unitId, error];
[self.delegate didFailToLoadRewardedAdWithError:[ALFluctMediationAdapterError maxErrorFromFluctError:error]];
[self.delegate didFailToLoadRewardedAdWithError:[ALFluctMediationAdapterError maxErrorFromFluctVideoError:error]];
}

- (void)rewardedVideoWillAppearForGroupId:(NSString *)groupId
Expand Down Expand Up @@ -183,7 +191,7 @@ - (void)rewardedVideoDidFailToPlayForGroupId:(NSString *)groupId
unitId:(NSString *)unitId
error:(NSError *)error {
[self.parentAdapter log:@"Rewarded ad failed to play for group id: %@, unit id: %@, error: %@", groupId, unitId, error];
[self.delegate didFailToDisplayRewardedAdWithError:[ALFluctMediationAdapterError maxErrorFromFluctError:error]];
[self.delegate didFailToDisplayRewardedAdWithError:[ALFluctMediationAdapterError maxErrorFromFluctVideoError:error]];
}

@end
3 changes: 2 additions & 1 deletion MaxMediationAdapterFluct/ALFluctMediationAdapterError.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ NS_ASSUME_NONNULL_BEGIN

@interface ALFluctMediationAdapterError : NSObject

+ (MAAdapterError *)maxErrorFromFluctError:(NSError *)error;
+ (MAAdapterError *)maxErrorFromFluctVideoError:(NSError *)error;
+ (MAAdapterError *)maxErrorFromFluctAdViewError:(NSError *)error;

@end

Expand Down
30 changes: 29 additions & 1 deletion MaxMediationAdapterFluct/ALFluctMediationAdapterError.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,35 @@

@implementation ALFluctMediationAdapterError

+ (MAAdapterError *)maxErrorFromFluctError:(NSError *)error {
+ (MAAdapterError *)maxErrorFromFluctAdViewError:(NSError *)error {

NSInteger fluctErrorCode = error.code;
MAAdapterError *adapterError = MAAdapterError.unspecified;
switch (fluctErrorCode) {
case FSSAdViewErrorNoAds:
adapterError = MAAdapterError.noFill;
break;
case FSSAdViewErrorBadRequest:
adapterError = MAAdapterError.badRequest;
break;
case FSSAdViewErrorNotConnectedToInternet:
adapterError = MAAdapterError.noConnection;
break;
case FSSAdViewErrorServerError:
adapterError = MAAdapterError.serverError;
break;
case FSSAdViewErrorUnknown:
default:
adapterError = MAAdapterError.unspecified;
break;
}

return [MAAdapterError errorWithAdapterError:adapterError
mediatedNetworkErrorCode:fluctErrorCode
mediatedNetworkErrorMessage:error.localizedDescription];
}

+ (MAAdapterError *)maxErrorFromFluctVideoError:(NSError *)error {

NSInteger fluctErrorCode = error.code;
MAAdapterError *adapterError = MAAdapterError.unspecified;
Expand Down
2 changes: 1 addition & 1 deletion MaxMediationAdapterFluct/ALFluctMediationAdapterParam.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
NS_ASSUME_NONNULL_BEGIN

@interface ALFluctMediationAdapterParam : NSObject
- (instancetype)initWithParameters:(nonnull id<MAAdapterResponseParameters>)params;
- (instancetype)initWithParameters:(nonnull id<MAAdapterResponseParameters>)parameters useCustomParameters:(BOOL)useCustomParameters;
@property (nonatomic, readonly, copy) NSString *groupId;
@property (nonatomic, readonly, copy) NSString *unitId;
@end
Expand Down
4 changes: 2 additions & 2 deletions MaxMediationAdapterFluct/ALFluctMediationAdapterParam.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
static NSString *const kUnitId = @"unitID";

@implementation ALFluctMediationAdapterParam
- (instancetype)initWithParameters:(nonnull id<MAAdapterResponseParameters>)parameters {
- (instancetype)initWithParameters:(nonnull id<MAAdapterResponseParameters>)parameters useCustomParameters:(BOOL)useCustomParameters {
self = [super init];
if (self) {
if ([parameters.customParameters objectForKey:kGroupId] && [parameters.customParameters objectForKey:kUnitId]) {
if ([parameters.customParameters objectForKey:kGroupId] && [parameters.customParameters objectForKey:kUnitId] && useCustomParameters) {
_groupId = parameters.customParameters[kGroupId];
_unitId = parameters.customParameters[kUnitId];
}
Expand Down
24 changes: 12 additions & 12 deletions SampleApp/Objective-C/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,30 @@ PODS:
- BURelyFoundation_Global/Zip (1.0.0.6):
- BURelyFoundation_Global/Foundation
- FiveAd (2.8.20240827)
- FluctSDK (6.37.3)
- FluctSDK-MediationAdapter/AppLovin (6.37.3):
- FluctSDK (6.38.0)
- FluctSDK-MediationAdapter/AppLovin (6.38.0):
- AppLovinSDK (= 13.0.0)
- FluctSDK (>= 6.14.0)
- FluctSDK-MediationAdapter/Five (6.37.3):
- FluctSDK-MediationAdapter/Five (6.38.0):
- FiveAd (= 2.8.20240827)
- FluctSDK (>= 6.14.0)
- FluctSDK-MediationAdapter/maio (6.37.3):
- FluctSDK-MediationAdapter/maio (6.38.0):
- FluctSDK (>= 6.14.0)
- MaioSDK-v2 (= 2.1.5)
- FluctSDK-MediationAdapter/Pangle (6.37.3):
- FluctSDK-MediationAdapter/Pangle (6.38.0):
- Ads-Global (= 6.2.0.9)
- FluctSDK (>= 6.14.0)
- FluctSDK-MediationAdapter/UnityAds (6.37.3):
- FluctSDK-MediationAdapter/UnityAds (6.38.0):
- FluctSDK (>= 6.14.0)
- UnityAds (= 4.12.1)
- Google-Mobile-Ads-SDK (11.1.0):
- GoogleUserMessagingPlatform (>= 1.1)
- GoogleMobileAdsMediationFluct (6.37.3):
- GoogleMobileAdsMediationFluct (6.38.0):
- FluctSDK (>= 6.12.1)
- Google-Mobile-Ads-SDK (>= 9.8.0)
- GoogleUserMessagingPlatform (2.2.0)
- MaioSDK-v2 (2.1.5)
- MaxMediationAdapterFluct (6.37.3):
- MaxMediationAdapterFluct (6.38.0):
- AppLovinSDK (>= 13.0.0)
- FluctSDK (>= 6.19.0)
- UnityAds (4.12.1)
Expand Down Expand Up @@ -101,13 +101,13 @@ SPEC CHECKSUMS:
AppLovinSDK: c0ecb434df24008b6ecdd7f1e5b8587bc45ff381
BURelyFoundation_Global: 17faee76affe097bd20b422fe829f9f90ed10e25
FiveAd: 1d6b833138351af2fb2248897eac71531c21cfd6
FluctSDK: 609211d57ad1fc8f5eadaf6feb8208945575fefc
FluctSDK-MediationAdapter: ab483e430b04863f7cf1008008ccfc815488eac7
FluctSDK: 7b433525e5a0413a320f7dc336d01c0728a8e032
FluctSDK-MediationAdapter: 566687c025da95e30d514bc68d8a8a5bd3d6bbf1
Google-Mobile-Ads-SDK: 4a1f2ccef63660f9a74efc6a6ea979483d421aaa
GoogleMobileAdsMediationFluct: 525ae1b283b69b1c27f9ae19abb25c4092158ce8
GoogleMobileAdsMediationFluct: 9cec35f404a1be6367b521b4867c3813e17a610b
GoogleUserMessagingPlatform: d31dbfb40ec02c5d9683029815c5d5a7f46389ee
MaioSDK-v2: 548968f22aa62f4955780d24f197eb205148082c
MaxMediationAdapterFluct: da9011e2f52da9989b8daa5bf769f3c1ef05b0b5
MaxMediationAdapterFluct: b8c63219ad963eaf07455cd9bbe71777fefba54c
UnityAds: f89ac1e717f5d566a58479a5b7cb9ed3a744cae3

PODFILE CHECKSUM: c61ebc569a4f7d73340bd85750e2a46f96f9084c
Expand Down
Loading

0 comments on commit fd44555

Please sign in to comment.