diff --git a/FluctSDK-MediationAdapter.podspec b/FluctSDK-MediationAdapter.podspec index e771e20..95f8bc1 100644 --- a/FluctSDK-MediationAdapter.podspec +++ b/FluctSDK-MediationAdapter.podspec @@ -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.27.3" + s.version = "6.27.4" s.author = "fluct,Inc." s.requires_arc = true s.static_framework = true diff --git a/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64/FluctSDK.framework/FluctSDK b/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64/FluctSDK.framework/FluctSDK index 7533c24..66e4889 100644 Binary files a/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64/FluctSDK.framework/FluctSDK and b/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64/FluctSDK.framework/FluctSDK differ diff --git a/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64/FluctSDK.framework/Info.plist b/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64/FluctSDK.framework/Info.plist index 97763a3..8fb6775 100644 Binary files a/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64/FluctSDK.framework/Info.plist and b/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64/FluctSDK.framework/Info.plist differ diff --git a/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64_x86_64-simulator/FluctSDK.framework/FluctSDK b/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64_x86_64-simulator/FluctSDK.framework/FluctSDK index 9b8abed..3475f43 100644 Binary files a/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64_x86_64-simulator/FluctSDK.framework/FluctSDK and b/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64_x86_64-simulator/FluctSDK.framework/FluctSDK differ diff --git a/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64_x86_64-simulator/FluctSDK.framework/Info.plist b/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64_x86_64-simulator/FluctSDK.framework/Info.plist index b724cee..8a8c754 100644 Binary files a/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64_x86_64-simulator/FluctSDK.framework/Info.plist and b/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64_x86_64-simulator/FluctSDK.framework/Info.plist differ diff --git a/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64_x86_64-simulator/FluctSDK.framework/_CodeSignature/CodeDirectory b/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64_x86_64-simulator/FluctSDK.framework/_CodeSignature/CodeDirectory index 2345904..68ab5b5 100644 Binary files a/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64_x86_64-simulator/FluctSDK.framework/_CodeSignature/CodeDirectory and b/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64_x86_64-simulator/FluctSDK.framework/_CodeSignature/CodeDirectory differ diff --git a/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64_x86_64-simulator/FluctSDK.framework/_CodeSignature/CodeRequirements-1 b/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64_x86_64-simulator/FluctSDK.framework/_CodeSignature/CodeRequirements-1 index fb861d5..dec33be 100644 Binary files a/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64_x86_64-simulator/FluctSDK.framework/_CodeSignature/CodeRequirements-1 and b/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64_x86_64-simulator/FluctSDK.framework/_CodeSignature/CodeRequirements-1 differ diff --git a/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64_x86_64-simulator/FluctSDK.framework/_CodeSignature/CodeResources b/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64_x86_64-simulator/FluctSDK.framework/_CodeSignature/CodeResources index 23fcf99..87f55e2 100644 --- a/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64_x86_64-simulator/FluctSDK.framework/_CodeSignature/CodeResources +++ b/FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64_x86_64-simulator/FluctSDK.framework/_CodeSignature/CodeResources @@ -130,7 +130,7 @@ </data> <key>Info.plist</key> <data> - RdAK7lZhpXR96JAC+9AqBXkzlIQ= + 7x7V5c8S1KtDX9OI4kTOXJ7XI3s= </data> <key>Modules/module.modulemap</key> <data> diff --git a/FluctSDK.embeddedframework/Resources/FluctSDKResources.bundle/Assets.car b/FluctSDK.embeddedframework/Resources/FluctSDKResources.bundle/Assets.car index ef5711c..d1d2570 100644 Binary files a/FluctSDK.embeddedframework/Resources/FluctSDKResources.bundle/Assets.car and b/FluctSDK.embeddedframework/Resources/FluctSDKResources.bundle/Assets.car differ diff --git a/FluctSDK.embeddedframework/Resources/FluctSDKResources.bundle/Info.plist b/FluctSDK.embeddedframework/Resources/FluctSDKResources.bundle/Info.plist index 53a94f1..ac17f22 100644 Binary files a/FluctSDK.embeddedframework/Resources/FluctSDKResources.bundle/Info.plist and b/FluctSDK.embeddedframework/Resources/FluctSDKResources.bundle/Info.plist differ diff --git a/FluctSDK.podspec b/FluctSDK.podspec index cf1ac29..bbd7a09 100644 --- a/FluctSDK.podspec +++ b/FluctSDK.podspec @@ -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.27.3" + s.version = "6.27.4" s.author = "fluct,Inc." s.requires_arc = true s.homepage = "https://fluct.jp/" diff --git a/GoogleMobileAdsMediationFluct.podspec b/GoogleMobileAdsMediationFluct.podspec index f05fafb..41b7f3e 100644 --- a/GoogleMobileAdsMediationFluct.podspec +++ b/GoogleMobileAdsMediationFluct.podspec @@ -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.27.3" + s.version = "6.27.4" s.author = "fluct,Inc." s.requires_arc = true s.static_framework = true diff --git a/GoogleMobileAdsMediationFluctLegacy.podspec b/GoogleMobileAdsMediationFluctLegacy.podspec deleted file mode 100644 index c64bd47..0000000 --- a/GoogleMobileAdsMediationFluctLegacy.podspec +++ /dev/null @@ -1,17 +0,0 @@ -Pod::Spec.new do |s| - s.name = "GoogleMobileAdsMediationFluctLegacy" - 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.27.3" - s.author = "fluct,Inc." - s.requires_arc = true - s.static_framework = true - s.homepage = "https://fluct.jp/" - s.source = { :git => "https://github.com/voyagegroup/FluctSDK-iOS.git", :tag => s.version } - s.source_files = "GoogleMobileAdsMediationFluctLegacy/*.{h,m}" - s.platform = :ios - s.ios.deployment_target = "9.0" - s.dependency "FluctSDK", ">= 6.12.1" - s.dependency "Google-Mobile-Ads-SDK", ">= 8.1.0" - s.cocoapods_version = ">= 1.9.0" -end diff --git a/GoogleMobileAdsMediationFluctLegacy/GADAdapterFluctVideoDelegateProxy.h b/GoogleMobileAdsMediationFluctLegacy/GADAdapterFluctVideoDelegateProxy.h deleted file mode 100644 index d947597..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADAdapterFluctVideoDelegateProxy.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// GADAdapterFluctVideoDelegateProxy.h -// FluctSDK -// -// Copyright © 2019 fluct, Inc. All rights reserved. -// - -#import <Foundation/Foundation.h> -@import FluctSDK; - -NS_ASSUME_NONNULL_BEGIN -@protocol GADAdapterFluctVideoDelegateProxyItem <NSObject> -- (void)rewardedVideoDidLoadForGroupID:(NSString *)groupId unitId:(NSString *)unitId; -- (void)rewardedVideoDidFailToLoadForGroupId:(NSString *)groupId unitId:(NSString *)unitId error:(NSError *)error; -- (void)rewardedVideoWillAppearForGroupId:(NSString *)groupId unitId:(NSString *)unitId; -- (void)rewardedVideoDidAppearForGroupId:(NSString *)groupId unitId:(NSString *)unitId; -- (void)rewardedVideoWillDisappearForGroupId:(NSString *)groupId unitId:(NSString *)unitId; -- (void)rewardedVideoDidDisappearForGroupId:(NSString *)groupId unitId:(NSString *)unitId; -- (void)rewardedVideoDidFailToPlayForGroupId:(NSString *)groupId unitId:(NSString *)unitId error:(NSError *)error; -@optional -- (void)rewardedVideoShouldRewardForGroupID:(NSString *)groupId unitId:(NSString *)unitId; -- (void)rewardedVideoDidClickForGroupId:(NSString *)groupId unitId:(NSString *)unitId; -@end - -@interface GADAdapterFluctVideoDelegateProxy : NSObject <FSSRewardedVideoDelegate, FSSRewardedVideoRTBDelegate> - -@property (class, nonatomic, readonly) GADAdapterFluctVideoDelegateProxy *sharedInstance; -- (void)registerDelegate:(id<GADAdapterFluctVideoDelegateProxyItem>)delegate groupId:(NSString *)groupId unitId:(NSString *)unitId; - -@end - -NS_ASSUME_NONNULL_END diff --git a/GoogleMobileAdsMediationFluctLegacy/GADAdapterFluctVideoDelegateProxy.m b/GoogleMobileAdsMediationFluctLegacy/GADAdapterFluctVideoDelegateProxy.m deleted file mode 100644 index d61331c..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADAdapterFluctVideoDelegateProxy.m +++ /dev/null @@ -1,100 +0,0 @@ -// -// GADAdapterFluctVideoDelegateProxy.m -// FluctSDK -// -// Copyright © 2019 fluct, Inc. All rights reserved. -// - -#import "GADAdapterFluctVideoDelegateProxy.h" - -@interface GADAdapterFluctVideoDelegateProxy () - -@property (nonatomic) NSMutableDictionary<NSString *, id<GADAdapterFluctVideoDelegateProxyItem>> *delegateTable; - -@end - -@implementation GADAdapterFluctVideoDelegateProxy - -+ (instancetype)sharedInstance { - static GADAdapterFluctVideoDelegateProxy *sharedInstance; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - sharedInstance = [[self alloc] init]; - }); - - return sharedInstance; -} - -- (instancetype)init { - self = [super init]; - if (self) { - _delegateTable = [NSMutableDictionary new]; - } - return self; -} - -- (void)registerDelegate:(id<GADAdapterFluctVideoDelegateProxyItem>)delegate groupId:(NSString *)groupId unitId:(NSString *)unitId { - NSString *key = [self keyWithGroupId:groupId unitId:unitId]; - self.delegateTable[key] = delegate; -} - -- (NSString *)keyWithGroupId:(NSString *)groupId unitId:(NSString *)unitId { - return [NSString stringWithFormat:@"%@-%@", groupId, unitId]; -} - -#pragma mark - FSSRewardedVideoDelegate -- (void)rewardedVideoDidLoadForGroupID:(NSString *)groupId unitId:(NSString *)unitId { - NSString *key = [self keyWithGroupId:groupId unitId:unitId]; - [self.delegateTable[key] rewardedVideoDidLoadForGroupID:groupId unitId:unitId]; -} - -- (void)rewardedVideoDidFailToLoadForGroupId:(NSString *)groupId unitId:(NSString *)unitId error:(NSError *)error { - NSString *key = [self keyWithGroupId:groupId unitId:unitId]; - [self.delegateTable[key] rewardedVideoDidFailToLoadForGroupId:groupId unitId:unitId error:error]; - self.delegateTable[key] = nil; -} - -- (void)rewardedVideoWillAppearForGroupId:(NSString *)groupId unitId:(NSString *)unitId { - NSString *key = [self keyWithGroupId:groupId unitId:unitId]; - [self.delegateTable[key] rewardedVideoWillAppearForGroupId:groupId unitId:unitId]; -} - -- (void)rewardedVideoDidAppearForGroupId:(NSString *)groupId unitId:(NSString *)unitId { - NSString *key = [self keyWithGroupId:groupId unitId:unitId]; - [self.delegateTable[key] rewardedVideoDidAppearForGroupId:groupId unitId:unitId]; -} - -- (void)rewardedVideoDidFailToPlayForGroupId:(NSString *)groupId unitId:(NSString *)unitId error:(NSError *)error { - NSString *key = [self keyWithGroupId:groupId unitId:unitId]; - [self.delegateTable[key] rewardedVideoDidFailToPlayForGroupId:groupId unitId:unitId error:error]; - self.delegateTable[key] = nil; -} - -- (void)rewardedVideoWillDisappearForGroupId:(NSString *)groupId unitId:(NSString *)unitId { - NSString *key = [self keyWithGroupId:groupId unitId:unitId]; - [self.delegateTable[key] rewardedVideoWillDisappearForGroupId:groupId unitId:unitId]; -} - -- (void)rewardedVideoDidDisappearForGroupId:(NSString *)groupId unitId:(NSString *)unitId { - NSString *key = [self keyWithGroupId:groupId unitId:unitId]; - [self.delegateTable[key] rewardedVideoDidDisappearForGroupId:groupId unitId:unitId]; - self.delegateTable[key] = nil; -} - -- (void)rewardedVideoShouldRewardForGroupID:(NSString *)groupId unitId:(NSString *)unitId { - NSString *key = [self keyWithGroupId:groupId unitId:unitId]; - id<GADAdapterFluctVideoDelegateProxyItem> delegate = self.delegateTable[key]; - if ([delegate respondsToSelector:@selector(rewardedVideoShouldRewardForGroupID:unitId:)]) { - [delegate rewardedVideoShouldRewardForGroupID:groupId unitId:unitId]; - } -} - -- (void)rewardedVideoDidClickForGroupId:(NSString *)groupId unitId:(NSString *)unitId { - NSString *key = [self keyWithGroupId:groupId unitId:unitId]; - id<GADAdapterFluctVideoDelegateProxyItem> delegate = self.delegateTable[key]; - if ([delegate respondsToSelector:@selector(rewardedVideoDidClickForGroupId:unitId:)]) { - [delegate rewardedVideoDidClickForGroupId:groupId unitId:unitId]; - } -} - -@end diff --git a/GoogleMobileAdsMediationFluctLegacy/GADBannerAdapterFluct.h b/GoogleMobileAdsMediationFluctLegacy/GADBannerAdapterFluct.h deleted file mode 100644 index 2e411fb..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADBannerAdapterFluct.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// GADBannerAdapterFluct.h -// FluctSDK -// -// Copyright © 2019 fluct, Inc. All rights reserved. -// - -#import <Foundation/Foundation.h> -@import GoogleMobileAds; - -NS_ASSUME_NONNULL_BEGIN - -@interface GADBannerAdapterFluct : NSObject <GADCustomEventBanner> -@end - -NS_ASSUME_NONNULL_END diff --git a/GoogleMobileAdsMediationFluctLegacy/GADBannerAdapterFluct.m b/GoogleMobileAdsMediationFluctLegacy/GADBannerAdapterFluct.m deleted file mode 100644 index 44813d0..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADBannerAdapterFluct.m +++ /dev/null @@ -1,83 +0,0 @@ -// -// GADBannerAdapterFluct.m -// FluctSDK -// -// Copyright © 2019 fluct, Inc. All rights reserved. -// - -#import "GADBannerAdapterFluct.h" -#import "GADMFluctError.h" -@import FluctSDK; - -@interface GADBannerAdapterFluct () <FSSAdViewDelegate> -@property (nonatomic, nullable) NSString *groupID; -@property (nonatomic, nullable) NSString *unitID; -@property (nonatomic) FSSAdView *adView; -@end - -@implementation GADBannerAdapterFluct - -@synthesize delegate; - -- (void)requestBannerAd:(GADAdSize)adSize parameter:(NSString *)serverParameter label:(NSString *)serverLabel request:(GADCustomEventRequest *)request { - NSError *error = nil; - if (![self setupAdapterWithParameter:serverParameter error:&error]) { - [self.delegate customEventBanner:self didFailAd:error]; - return; - } - - FSSConfigurationOptions *options = FSSConfigurationOptions.defaultOptions; - options.mediationPlatformType = FSSMediationPlatformTypeGoogleMobileAds; - options.mediationPlatformSDKVersion = [NSString stringWithFormat:@"%s", GoogleMobileAdsVersionString]; - [FluctSDK configureWithOptions:options]; - - self.adView = [[FSSAdView alloc] initWithGroupId:self.groupID unitId:self.unitID size:adSize.size]; - self.adView.delegate = self; - - // iOS12でloadされない問題の対応のため、viewController.viewのhierarchyに追加する - self.adView.hidden = YES; - UIViewController *viewController = [self.delegate viewControllerForPresentingModalView]; - [viewController.view addSubview:self.adView]; - - [self.adView loadAd]; -} - -#pragma mark - setup -- (BOOL)setupAdapterWithParameter:(NSString *)serverParameter error:(NSError **)error { - NSArray<NSString *> *ids = [serverParameter componentsSeparatedByString:@","]; - if (ids.count != 2) { - if (error) { - *error = [NSError errorWithDomain:GADMFluctErrorDomain - code:GADMFluctErrorInvalidCustomParameters - userInfo:@{}]; - } - return NO; - } - - self.groupID = ids.firstObject; - self.unitID = ids.lastObject; - return YES; -} - -#pragma mark - FSSAdViewDelegate - -- (void)adViewDidStoreAd:(FSSAdView *)adView { - // iOS12でloadされない問題の対応のため、viewController.viewのhierarchyに追加されているので - // removeFromSuperviewする必要あり - [adView removeFromSuperview]; - adView.hidden = NO; - [self.delegate customEventBanner:self didReceiveAd:adView]; -} - -- (void)adView:(FSSAdView *)adView didFailToStoreAdWithError:(NSError *)error { - // iOS12でloadされない問題の対応のため、viewController.viewのhierarchyに追加されているので - // removeFromSuperviewする - [adView removeFromSuperview]; - [self.delegate customEventBanner:self didFailAd:error]; -} - -- (void)willLeaveApplicationForAdView:(FSSAdView *)adView { - [self.delegate customEventBannerWasClicked:self]; -} - -@end diff --git a/GoogleMobileAdsMediationFluctLegacy/GADBannerAdapterFluctOptimizer.h b/GoogleMobileAdsMediationFluctLegacy/GADBannerAdapterFluctOptimizer.h deleted file mode 100644 index 9388b5b..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADBannerAdapterFluctOptimizer.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// GADBannerAdapterFluctOptimizer.h -// FluctSDK -// -// Copyright © 2020 fluct, inc. All rights reserved. -// - -#import <Foundation/Foundation.h> -@import GoogleMobileAds; - -NS_ASSUME_NONNULL_BEGIN - -@interface GADBannerAdapterFluctOptimizer : NSObject <GADCustomEventBanner> -@end - -NS_ASSUME_NONNULL_END diff --git a/GoogleMobileAdsMediationFluctLegacy/GADBannerAdapterFluctOptimizer.m b/GoogleMobileAdsMediationFluctLegacy/GADBannerAdapterFluctOptimizer.m deleted file mode 100644 index 5153272..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADBannerAdapterFluctOptimizer.m +++ /dev/null @@ -1,84 +0,0 @@ -// -// GADBannerAdapterFluctOptimizer.m -// FluctSDK -// -// Copyright © 2020 fluct, inc. All rights reserved. -// - -#import "GADBannerAdapterFluctOptimizer.h" -#import "GADMFluctError.h" -#import <FluctSDK/FluctSDK.h> - -@interface GADBannerAdapterFluctOptimizer () <FSSBannerCustomEventOptimizerDelegate> -@property (nonatomic, nullable) NSString *groupID; -@property (nonatomic, nullable) NSString *unitID; -@property (nonatomic, nullable) NSString *pricePoint; -@property (nonatomic, nullable) FSSBannerCustomEventOptimizer *optimizer; -@end - -@implementation GADBannerAdapterFluctOptimizer - -@synthesize delegate; - -- (void)requestBannerAd:(GADAdSize)adSize parameter:(NSString *)serverParameter label:(NSString *)serverLabel request:(GADCustomEventRequest *)request { - NSError *error = nil; - if (![self setupAdapterWithParameter:serverParameter error:&error]) { - [self.delegate customEventBanner:self didFailAd:error]; - return; - } - - FSSConfigurationOptions *options = FSSConfigurationOptions.defaultOptions; - options.mediationPlatformType = FSSMediationPlatformTypeGoogleMobileAds; - options.mediationPlatformSDKVersion = [NSString stringWithFormat:@"%s", GoogleMobileAdsVersionString]; - [FluctSDK configureWithOptions:options]; - - self.optimizer = [[FSSBannerCustomEventOptimizer alloc] initWithGroupId:self.groupID - unitId:self.unitID - pricePoint:self.pricePoint]; - self.optimizer.delegate = self; - - UIViewController *viewController = [self.delegate viewControllerForPresentingModalView]; - [self.optimizer requestWithTopViewController:viewController size:adSize.size]; -} - -#pragma mark - FSSBannerCustomEventOptimizer - -- (void)customEventNotFoundResponse:(FSSBannerCustomEventOptimizer *)customEvent { - NSError *error = [NSError errorWithDomain:GADMFluctErrorDomain - code:GADMFluctErrorNoResponse - userInfo:nil]; - [self.delegate customEventBanner:self didFailAd:error]; -} - -- (void)customEvent:(FSSBannerCustomEventOptimizer *)customEvent didStoreAdView:(FSSAdView *)adView { - [self.delegate customEventBanner:self didReceiveAd:adView]; -} - -- (void)customEvent:(FSSBannerCustomEventOptimizer *)customEvent didFailToStoreAdView:(FSSAdView *)adView withError:(NSError *)error { - [self.delegate customEventBanner:self didFailAd:error]; -} - -- (void)customEvent:(FSSBannerCustomEventOptimizer *)customEvent willLeaveApplicationForAdView:(FSSAdView *)adView { - [self.delegate customEventBannerWasClicked:self]; -} - -#pragma mark - setup - -- (BOOL)setupAdapterWithParameter:(NSString *)serverParameter error:(NSError **)error { - NSArray<NSString *> *ids = [serverParameter componentsSeparatedByString:@","]; - if (ids.count != 3) { - if (error) { - *error = [NSError errorWithDomain:GADMFluctErrorDomain - code:GADMFluctErrorInvalidCustomParameters - userInfo:@{}]; - } - return NO; - } - - self.groupID = ids[0]; - self.unitID = ids[1]; - self.pricePoint = ids[2]; - return YES; -} - -@end diff --git a/GoogleMobileAdsMediationFluctLegacy/GADBannerAdapterFluctStarter.h b/GoogleMobileAdsMediationFluctLegacy/GADBannerAdapterFluctStarter.h deleted file mode 100644 index 1d8819a..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADBannerAdapterFluctStarter.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// GADBannerAdapterFluctStarter.h -// FluctSDK -// -// Copyright © 2020 fluct, inc. All rights reserved. -// - -#import <Foundation/Foundation.h> -@import GoogleMobileAds; - -NS_ASSUME_NONNULL_BEGIN - -@interface GADBannerAdapterFluctStarter : NSObject <GADCustomEventBanner> -@end - -NS_ASSUME_NONNULL_END diff --git a/GoogleMobileAdsMediationFluctLegacy/GADBannerAdapterFluctStarter.m b/GoogleMobileAdsMediationFluctLegacy/GADBannerAdapterFluctStarter.m deleted file mode 100644 index ac2ff94..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADBannerAdapterFluctStarter.m +++ /dev/null @@ -1,83 +0,0 @@ -// -// GADBannerAdapterFluctStarter.m -// FluctSDK -// -// Copyright © 2020 fluct, inc. All rights reserved. -// - -#import "GADBannerAdapterFluctStarter.h" -#import "GADMFluctError.h" -#import <FluctSDK/FluctSDK.h> - -@interface GADBannerAdapterFluctStarter () <FSSBannerCustomEventStarterDelegate> -@property (nonatomic, nullable, copy) NSString *groupID; -@property (nonatomic, nullable, copy) NSString *unitID; -@property (nonatomic, nullable, copy) NSString *pricePoint; -@property (nonatomic, nullable) FSSBannerCustomEventStarter *starter; -@end - -@implementation GADBannerAdapterFluctStarter - -@synthesize delegate; - -- (void)requestBannerAd:(GADAdSize)adSize parameter:(NSString *)serverParameter label:(NSString *)serverLabel request:(GADCustomEventRequest *)request { - NSError *error = nil; - if (![self setupAdapterWithParameter:serverParameter error:&error]) { - [self.delegate customEventBanner:self didFailAd:error]; - return; - } - - FSSConfigurationOptions *options = FSSConfigurationOptions.defaultOptions; - options.mediationPlatformType = FSSMediationPlatformTypeGoogleMobileAds; - options.mediationPlatformSDKVersion = [NSString stringWithFormat:@"%s", GoogleMobileAdsVersionString]; - [FluctSDK configureWithOptions:options]; - - self.starter = [[FSSBannerCustomEventStarter alloc] initWithGroupId:self.groupID - unitId:self.unitID - pricePoint:self.pricePoint]; - self.starter.delegate = self; - UIViewController *viewController = [self.delegate viewControllerForPresentingModalView]; - [self.starter requestWithAdSize:adSize.size topViewController:viewController]; -} - -#pragma mark - FSSBannerCustomEventStarterDelegate - -- (void)customEventNotFoundResponse:(FSSBannerCustomEventStarter *)customEvent { - NSError *error = [NSError errorWithDomain:GADMFluctErrorDomain - code:GADMFluctErrorNoResponse - userInfo:nil]; - [self.delegate customEventBanner:self didFailAd:error]; -} - -- (void)customEvent:(FSSBannerCustomEventStarter *)customEvent didStoreAdView:(FSSAdView *)adView { - [self.delegate customEventBanner:self didReceiveAd:adView]; -} - -- (void)customEvent:(FSSBannerCustomEventStarter *)customEvent didFailToStoreAdView:(FSSAdView *)adView withError:(NSError *)error { - [self.delegate customEventBanner:self didFailAd:error]; -} - -- (void)customEvent:(FSSBannerCustomEventStarter *)customEvent willLeaveApplicationForAdView:(FSSAdView *)adView { - [self.delegate customEventBannerWasClicked:self]; -} - -#pragma mark - Setup - -- (BOOL)setupAdapterWithParameter:(NSString *)serverParameter error:(NSError **)error { - NSArray<NSString *> *ids = [serverParameter componentsSeparatedByString:@","]; - if (ids.count != 3) { - if (error) { - *error = [NSError errorWithDomain:GADMFluctErrorDomain - code:GADMFluctErrorInvalidCustomParameters - userInfo:@{}]; - } - return NO; - } - - self.groupID = ids[0]; - self.unitID = ids[1]; - self.pricePoint = ids[2]; - return YES; -} - -@end diff --git a/GoogleMobileAdsMediationFluctLegacy/GADMAdapterFluctExtras.h b/GoogleMobileAdsMediationFluctLegacy/GADMAdapterFluctExtras.h deleted file mode 100644 index 785c603..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADMAdapterFluctExtras.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// GADMAdapterFluctExtras.h -// FluctSDK -// -// Copyright © 2019 fluct, Inc. All rights reserved. -// - -#import <Foundation/Foundation.h> -@import GoogleMobileAds; -@import FluctSDK; - -NS_ASSUME_NONNULL_BEGIN - -@interface GADMAdapterFluctExtras : NSObject <GADAdNetworkExtras> - -@property (nonatomic, nullable) FSSRewardedVideoSetting *setting; -@property (nonatomic, nullable) FSSAdRequestTargeting *targeting; - -@end - -NS_ASSUME_NONNULL_END diff --git a/GoogleMobileAdsMediationFluctLegacy/GADMAdapterFluctExtras.m b/GoogleMobileAdsMediationFluctLegacy/GADMAdapterFluctExtras.m deleted file mode 100644 index 43847da..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADMAdapterFluctExtras.m +++ /dev/null @@ -1,12 +0,0 @@ -// -// GADMAdapterFluctExtras.m -// FluctSDK -// -// Copyright © 2019 fluct, Inc. All rights reserved. -// - -#import "GADMAdapterFluctExtras.h" - -@implementation GADMAdapterFluctExtras - -@end diff --git a/GoogleMobileAdsMediationFluctLegacy/GADMAdapterFluctRewardedAd.h b/GoogleMobileAdsMediationFluctLegacy/GADMAdapterFluctRewardedAd.h deleted file mode 100644 index 5fad2b1..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADMAdapterFluctRewardedAd.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// GADMAdapterFluctRewardedAd.h -// FluctSDK -// -// Copyright © 2019 fluct, Inc. All rights reserved. -// - -#import <Foundation/Foundation.h> -@import GoogleMobileAds; - -NS_ASSUME_NONNULL_BEGIN - -@interface GADMAdapterFluctRewardedAd : NSObject <GADMediationRewardedAd> - -- (void)loadRewardedAdForAdConfiguration:(GADMediationRewardedAdConfiguration *)adConfiguration - completionHandler:(GADMediationRewardedLoadCompletionHandler)completionHandler; - -@end - -NS_ASSUME_NONNULL_END diff --git a/GoogleMobileAdsMediationFluctLegacy/GADMAdapterFluctRewardedAd.m b/GoogleMobileAdsMediationFluctLegacy/GADMAdapterFluctRewardedAd.m deleted file mode 100644 index d47b0ba..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADMAdapterFluctRewardedAd.m +++ /dev/null @@ -1,119 +0,0 @@ -// -// GADMAdapterFluctRewardedAd.m -// FluctSDK -// -// Copyright © 2019 fluct, Inc. All rights reserved. -// - -#import "GADMAdapterFluctRewardedAd.h" -#import "GADAdapterFluctVideoDelegateProxy.h" -#import "GADMAdapterFluctExtras.h" -#import "GADMFluctError.h" - -@import FluctSDK; - -@interface GADMAdapterFluctRewardedAd () <GADAdapterFluctVideoDelegateProxyItem> -@property (nonatomic, nullable, copy) GADMediationRewardedLoadCompletionHandler completionHandler; -@property (nonatomic, nullable, weak) id<GADMediationRewardedAdEventDelegate> adEventDelegate; -@property (nonatomic, nullable, copy) NSString *groupID; -@property (nonatomic, nullable, copy) NSString *unitID; -@end - -@implementation GADMAdapterFluctRewardedAd - -- (void)loadRewardedAdForAdConfiguration:(GADMediationRewardedAdConfiguration *)adConfiguration completionHandler:(GADMediationRewardedLoadCompletionHandler)completionHandler { - NSString *params = adConfiguration.credentials.settings[GADCustomEventParametersServer]; - NSArray<NSString *> *ids = [params componentsSeparatedByString:@","]; - if (ids.count == 2) { - self.groupID = ids.firstObject; - self.unitID = ids.lastObject; - } - - if (!self.groupID || !self.unitID) { - NSError *error = [NSError errorWithDomain:GADMFluctErrorDomain - code:GADMFluctErrorInvalidCustomParameters - userInfo:@{}]; - completionHandler(nil, error); - return; - } - - FSSConfigurationOptions *options = [FluctSDK currentConfigureOptions]; - options.mediationPlatformType = FSSMediationPlatformTypeGoogleMobileAds; - options.mediationPlatformSDKVersion = [NSString stringWithFormat:@"%s", GoogleMobileAdsVersionString]; - [FluctSDK configureWithOptions:options]; - - self.completionHandler = completionHandler; - - [[GADAdapterFluctVideoDelegateProxy sharedInstance] registerDelegate:self groupId:self.groupID unitId:self.unitID]; - FSSRewardedVideo.sharedInstance.delegate = GADAdapterFluctVideoDelegateProxy.sharedInstance; - - GADMAdapterFluctExtras *extras = adConfiguration.extras; - if (extras.setting) { - FSSRewardedVideo.sharedInstance.setting = extras.setting; - } - if (extras.targeting) { - [[FSSRewardedVideo sharedInstance] loadRewardedVideoWithGroupId:self.groupID - unitId:self.unitID - targeting:extras.targeting]; - return; - } - - [[FSSRewardedVideo sharedInstance] loadRewardedVideoWithGroupId:self.groupID - unitId:self.unitID]; -} - -- (void)presentFromViewController:(nonnull UIViewController *)viewController { - [[FSSRewardedVideo sharedInstance] presentRewardedVideoAdForGroupId:self.groupID - unitId:self.unitID - fromViewController:viewController]; -} - -#pragma mark - GADAdapterFluctVideoDelegateProxyItem -- (void)rewardedVideoDidLoadForGroupID:(NSString *)groupId unitId:(NSString *)unitId { - if (self.completionHandler) { - self.adEventDelegate = self.completionHandler(self, nil); - self.completionHandler = nil; - } -} - -- (void)rewardedVideoDidFailToLoadForGroupId:(NSString *)groupId unitId:(NSString *)unitId error:(NSError *)error { - if (self.completionHandler) { - NSError *err = [NSError errorWithDomain:GADMFluctErrorDomain - code:error.code - userInfo:error.userInfo]; - self.completionHandler(nil, err); - self.completionHandler = nil; - } -} - -- (void)rewardedVideoWillAppearForGroupId:(NSString *)groupId unitId:(NSString *)unitId { - [self.adEventDelegate willPresentFullScreenView]; -} - -- (void)rewardedVideoDidAppearForGroupId:(NSString *)groupId unitId:(NSString *)unitId { - [self.adEventDelegate didStartVideo]; -} - -- (void)rewardedVideoDidFailToPlayForGroupId:(NSString *)groupId unitId:(NSString *)unitId error:(NSError *)error { - NSError *err = [NSError errorWithDomain:GADMFluctErrorDomain - code:error.code - userInfo:error.userInfo]; - [self.adEventDelegate didFailToPresentWithError:err]; -} - -- (void)rewardedVideoShouldRewardForGroupID:(NSString *)groupId unitId:(NSString *)unitId { - [self.adEventDelegate didEndVideo]; - GADAdReward *rewardItem = [[GADAdReward alloc] initWithRewardType:@"" - rewardAmount:[NSDecimalNumber one]]; - [self.adEventDelegate didRewardUserWithReward:rewardItem]; -} - -- (void)rewardedVideoWillDisappearForGroupId:(NSString *)groupId unitId:(NSString *)unitId { - [self.adEventDelegate willDismissFullScreenView]; -} - -- (void)rewardedVideoDidDisappearForGroupId:(NSString *)groupId unitId:(NSString *)unitId { - [self.adEventDelegate didDismissFullScreenView]; -} - -@end diff --git a/GoogleMobileAdsMediationFluctLegacy/GADMFluctError.h b/GoogleMobileAdsMediationFluctLegacy/GADMFluctError.h deleted file mode 100644 index e7c1aa8..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADMFluctError.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// GADMFluctError.h -// FluctSDK -// -// Copyright © 2019 fluct, Inc. All rights reserved. -// - -#ifndef GADMFluctError_h -#define GADMFluctError_h - -static NSString *const GADMFluctErrorDomain = @"jp.fluct.GADMediationAdapterFluct"; - -typedef NS_ENUM(NSInteger, GADMFluctError) { - GADMFluctErrorInvalidCustomParameters = 0, - GADMFluctErrorInvalidSize = 1, - GADMFluctErrorNoResponse = 2 -}; - -#endif /* GADMFluctError_h */ diff --git a/GoogleMobileAdsMediationFluctLegacy/GADMediationAdapterFluct.h b/GoogleMobileAdsMediationFluctLegacy/GADMediationAdapterFluct.h deleted file mode 100644 index 668a100..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADMediationAdapterFluct.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// GADMediationAdapterFluct.h -// FluctSDK -// -// Copyright © 2019 fluct, Inc. All rights reserved. -// - -#import <Foundation/Foundation.h> -@import GoogleMobileAds; - -NS_ASSUME_NONNULL_BEGIN - -@interface GADMediationAdapterFluct : NSObject <GADMediationAdapter> -@end - -NS_ASSUME_NONNULL_END diff --git a/GoogleMobileAdsMediationFluctLegacy/GADMediationAdapterFluct.m b/GoogleMobileAdsMediationFluctLegacy/GADMediationAdapterFluct.m deleted file mode 100644 index 52f12c4..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADMediationAdapterFluct.m +++ /dev/null @@ -1,74 +0,0 @@ -// -// GADMediationAdapterFluct.m -// FluctSDK -// -// Copyright © 2019 fluct, Inc. All rights reserved. -// - -#import "GADMediationAdapterFluct.h" -#import "GADMAdapterFluctExtras.h" -#import "GADMAdapterFluctRewardedAd.h" -#import "GADMFluctError.h" - -@import FluctSDK; - -@interface GADMediationAdapterFluct () -@property (nonatomic, nullable) GADMAdapterFluctRewardedAd *rewardedAd; -@end - -@implementation GADMediationAdapterFluct - -+ (void)setUpWithConfiguration:(GADMediationServerConfiguration *)configuration completionHandler:(GADMediationAdapterSetUpCompletionBlock)completionHandler { - NSMutableSet *params = [[NSMutableSet alloc] init]; - for (GADMediationCredentials *credential in configuration.credentials) { - NSString *param = [credential.settings valueForKey:GADCustomEventParametersServer]; - [params addObject:param]; - } - - if (params.count == 0) { - // custom event parameters がセットされていない - NSError *error = [NSError errorWithDomain:GADMFluctErrorDomain - code:GADMFluctErrorInvalidCustomParameters - userInfo:nil]; - completionHandler(error); - return; - } - - completionHandler(nil); -} - -+ (GADVersionNumber)adSDKVersion { - NSString *versionString = [FluctSDK version]; - NSArray<NSString *> *versionComponents = [versionString componentsSeparatedByString:@"."]; - GADVersionNumber version = {0}; - if (versionComponents.count == 3) { - version.majorVersion = [versionComponents[0] integerValue]; - version.minorVersion = [versionComponents[1] integerValue]; - version.patchVersion = [versionComponents[2] integerValue]; - } - return version; -} - -+ (GADVersionNumber)adapterVersion { - NSString *versionString = [FluctSDK version]; - NSArray<NSString *> *versionComponents = [versionString componentsSeparatedByString:@"."]; - GADVersionNumber version = {0}; - if (versionComponents.count == 3) { - version.majorVersion = [versionComponents[0] integerValue]; - version.minorVersion = [versionComponents[1] integerValue]; - version.patchVersion = [versionComponents[2] integerValue]; - } - return version; -} - -+ (nullable Class<GADAdNetworkExtras>)networkExtrasClass { - return [GADMAdapterFluctExtras class]; -} - -- (void)loadRewardedAdForAdConfiguration:(GADMediationRewardedAdConfiguration *)adConfiguration completionHandler:(GADMediationRewardedLoadCompletionHandler)completionHandler { - self.rewardedAd = [GADMAdapterFluctRewardedAd new]; - [self.rewardedAd loadRewardedAdForAdConfiguration:adConfiguration - completionHandler:completionHandler]; -} - -@end diff --git a/GoogleMobileAdsMediationFluctLegacy/GADRewardedVideoAdapterFluctOptimizer.h b/GoogleMobileAdsMediationFluctLegacy/GADRewardedVideoAdapterFluctOptimizer.h deleted file mode 100644 index ba06266..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADRewardedVideoAdapterFluctOptimizer.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// GADRewardedVideoAdapterFluctOptimizer.h -// FluctSDK -// -// Copyright © 2020 fluct, Inc. All rights reserved. -// - -#import <Foundation/Foundation.h> -#import <GoogleMobileAds/GoogleMobileAds.h> - -NS_ASSUME_NONNULL_BEGIN - -@interface GADRewardedVideoAdapterFluctOptimizer : NSObject <GADMediationAdapter, GADMediationRewardedAd> -@end - -NS_ASSUME_NONNULL_END diff --git a/GoogleMobileAdsMediationFluctLegacy/GADRewardedVideoAdapterFluctOptimizer.m b/GoogleMobileAdsMediationFluctLegacy/GADRewardedVideoAdapterFluctOptimizer.m deleted file mode 100644 index 2e8a922..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADRewardedVideoAdapterFluctOptimizer.m +++ /dev/null @@ -1,186 +0,0 @@ -// -// GADRewardedVideoAdapterFluctOptimizer.m -// FluctSDK -// -// Copyright © 2020 fluct, Inc. All rights reserved. -// - -#import "GADRewardedVideoAdapterFluctOptimizer.h" -#import "GADAdapterFluctVideoDelegateProxy.h" -#import "GADMAdapterFluctExtras.h" -#import "GADMFluctError.h" -#import <FluctSDK/FluctSDK.h> - -@interface GADRewardedVideoAdapterFluctOptimizer () <GADAdapterFluctVideoDelegateProxyItem, FSSRewardedVideoCustomEventOptimizerDelegate> -@property (nonatomic, nullable, copy) GADMediationRewardedLoadCompletionHandler completionHandler; -@property (nonatomic, nullable, weak) id<GADMediationRewardedAdEventDelegate> adEventDelegate; - -@property (nonatomic, nullable, copy) NSString *groupID; -@property (nonatomic, nullable, copy) NSString *unitID; -@property (nonatomic, nullable, copy) NSString *pricePoint; -@property (nonatomic, nullable) FSSRewardedVideoCustomEventOptimizer *optimizer; -@end - -@implementation GADRewardedVideoAdapterFluctOptimizer - -+ (void)setUpWithConfiguration:(GADMediationServerConfiguration *)configuration completionHandler:(GADMediationAdapterSetUpCompletionBlock)completionHandler { - NSMutableSet *params = [[NSMutableSet alloc] init]; - for (GADMediationCredentials *credential in configuration.credentials) { - NSString *param = [credential.settings valueForKey:GADCustomEventParametersServer]; - [params addObject:param]; - } - - if (params.count == 0) { - // custom event parameters がセットされていない - NSError *error = [NSError errorWithDomain:GADMFluctErrorDomain - code:GADMFluctErrorInvalidCustomParameters - userInfo:nil]; - completionHandler(error); - return; - } - - completionHandler(nil); -} - -+ (GADVersionNumber)adSDKVersion { - NSString *versionString = [FluctSDK version]; - NSArray<NSString *> *versionComponents = [versionString componentsSeparatedByString:@"."]; - GADVersionNumber version = {0}; - if (versionComponents.count == 3) { - version.majorVersion = [versionComponents[0] integerValue]; - version.minorVersion = [versionComponents[1] integerValue]; - version.patchVersion = [versionComponents[2] integerValue]; - } - return version; -} - -+ (nullable Class<GADAdNetworkExtras>)networkExtrasClass { - return [GADMAdapterFluctExtras class]; -} - -+ (GADVersionNumber)adapterVersion { - NSString *versionString = [FluctSDK version]; - NSArray<NSString *> *versionComponents = [versionString componentsSeparatedByString:@"."]; - GADVersionNumber version = {0}; - if (versionComponents.count == 3) { - version.majorVersion = [versionComponents[0] integerValue]; - version.minorVersion = [versionComponents[1] integerValue]; - version.patchVersion = [versionComponents[2] integerValue]; - } - - return version; -} - -- (void)loadRewardedAdForAdConfiguration:(GADMediationRewardedAdConfiguration *)adConfiguration - completionHandler:(GADMediationRewardedLoadCompletionHandler)completionHandler { - NSArray<NSString *> *params = [adConfiguration.credentials.settings[GADCustomEventParametersServer] componentsSeparatedByString:@","]; - if (params.count == 3) { - self.groupID = params[0]; - self.unitID = params[1]; - self.pricePoint = params[2]; - } - - if (!self.groupID || !self.unitID || !self.pricePoint) { - NSError *error = [NSError errorWithDomain:GADMFluctErrorDomain - code:GADMFluctErrorInvalidCustomParameters - userInfo:@{}]; - completionHandler(nil, error); - return; - } - - FSSConfigurationOptions *options = [FluctSDK currentConfigureOptions]; - options.mediationPlatformType = FSSMediationPlatformTypeGoogleMobileAds; - options.mediationPlatformSDKVersion = [NSString stringWithFormat:@"%s", GoogleMobileAdsVersionString]; - [FluctSDK configureWithOptions:options]; - - self.completionHandler = completionHandler; - self.optimizer = [[FSSRewardedVideoCustomEventOptimizer alloc] initWithGroupId:self.groupID - unitId:self.unitID - pricePoint:self.pricePoint]; - self.optimizer.delegate = self; - - FSSRewardedVideoSetting *setting = [FSSRewardedVideoSetting defaultSetting]; - GADMAdapterFluctExtras *extras = adConfiguration.extras; - if (extras.setting) { - setting = extras.setting; - } - - [[GADAdapterFluctVideoDelegateProxy sharedInstance] registerDelegate:self - groupId:self.groupID - unitId:self.unitID]; - - [self.optimizer requestWithSetting:setting - delegate:GADAdapterFluctVideoDelegateProxy.sharedInstance - rtbDelegate:GADAdapterFluctVideoDelegateProxy.sharedInstance]; -} - -- (void)presentFromViewController:(UIViewController *)viewController { - if ([self.optimizer hasAdAvailable]) { - [self.optimizer presentAdFromViewController:viewController]; - } -} - -#pragma mark - FSSRewardedVideoCustomEventOptimizer - -- (void)customEventNotFoundResponse:(FSSRewardedVideoCustomEventOptimizer *)customEvent { - NSError *error = [NSError errorWithDomain:GADMFluctErrorDomain - code:GADMFluctErrorNoResponse - userInfo:nil]; - self.completionHandler(nil, error); - self.completionHandler = nil; -} - -#pragma mark - GADAdapterFluctVideoDelegateProxyItem - -- (void)rewardedVideoDidLoadForGroupID:(NSString *)groupId unitId:(NSString *)unitId { - if (self.completionHandler) { - self.adEventDelegate = self.completionHandler(self, nil); - self.completionHandler = nil; - } -} - -- (void)rewardedVideoDidFailToLoadForGroupId:(NSString *)groupId unitId:(NSString *)unitId error:(NSError *)error { - if (self.completionHandler) { - NSError *err = [NSError errorWithDomain:GADMFluctErrorDomain - code:error.code - userInfo:error.userInfo]; - self.completionHandler(nil, err); - self.completionHandler = nil; - } -} - -- (void)rewardedVideoWillAppearForGroupId:(NSString *)groupId unitId:(NSString *)unitId { - [self.adEventDelegate willPresentFullScreenView]; -} - -- (void)rewardedVideoDidAppearForGroupId:(NSString *)groupId unitId:(NSString *)unitId { - [self.adEventDelegate didStartVideo]; -} - -- (void)rewardedVideoDidFailToPlayForGroupId:(NSString *)groupId unitId:(NSString *)unitId error:(NSError *)error { - NSError *err = [NSError errorWithDomain:GADMFluctErrorDomain - code:error.code - userInfo:error.userInfo]; - [self.adEventDelegate didFailToPresentWithError:err]; -} - -- (void)rewardedVideoShouldRewardForGroupID:(NSString *)groupId unitId:(NSString *)unitId { - [self.adEventDelegate didEndVideo]; - GADAdReward *rewardItem = [[GADAdReward alloc] initWithRewardType:@"" - rewardAmount:[NSDecimalNumber one]]; - [self.adEventDelegate didRewardUserWithReward:rewardItem]; -} - -- (void)rewardedVideoWillDisappearForGroupId:(NSString *)groupId unitId:(NSString *)unitId { - [self.adEventDelegate willDismissFullScreenView]; -} - -- (void)rewardedVideoDidDisappearForGroupId:(NSString *)groupId unitId:(NSString *)unitId { - [self.adEventDelegate didDismissFullScreenView]; -} - -- (void)rewardedVideoDidClickForGroupId:(NSString *)groupId unitId:(NSString *)unitId { - [self.adEventDelegate reportClick]; -} - -@end diff --git a/GoogleMobileAdsMediationFluctLegacy/GADRewardedVideoAdapterFluctStarter.h b/GoogleMobileAdsMediationFluctLegacy/GADRewardedVideoAdapterFluctStarter.h deleted file mode 100644 index 50c6f3e..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADRewardedVideoAdapterFluctStarter.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// GADRewardedVideoAdapterFluctStarter.h -// FluctSDK -// -// Copyright © 2020 fluct, Inc. All rights reserved. -// - -#import <Foundation/Foundation.h> -#import <GoogleMobileAds/GoogleMobileAds.h> - -NS_ASSUME_NONNULL_BEGIN - -@interface GADRewardedVideoAdapterFluctStarter : NSObject <GADMediationAdapter, GADMediationRewardedAd> -@end - -NS_ASSUME_NONNULL_END diff --git a/GoogleMobileAdsMediationFluctLegacy/GADRewardedVideoAdapterFluctStarter.m b/GoogleMobileAdsMediationFluctLegacy/GADRewardedVideoAdapterFluctStarter.m deleted file mode 100644 index d0982a9..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADRewardedVideoAdapterFluctStarter.m +++ /dev/null @@ -1,187 +0,0 @@ -// -// GADRewardedVideoAdapterFluctStarter.m -// FluctSDK -// -// Copyright © 2020 fluct, Inc. All rights reserved. -// - -#import "GADRewardedVideoAdapterFluctStarter.h" -#import "GADAdapterFluctVideoDelegateProxy.h" -#import "GADMAdapterFluctExtras.h" -#import "GADMFluctError.h" -#import <FluctSDK/FluctSDK.h> - -@interface GADRewardedVideoAdapterFluctStarter () <GADAdapterFluctVideoDelegateProxyItem, FSSRewardedVideoCustomEventStarterDelegate> -@property (nonatomic, nullable, copy) GADMediationRewardedLoadCompletionHandler completionHandler; -@property (nonatomic, nullable, weak) id<GADMediationRewardedAdEventDelegate> adEventDelegate; - -@property (nonatomic, nullable) FSSRewardedVideoCustomEventStarter *starter; -@property (nonatomic, nullable, copy) NSString *groupID; -@property (nonatomic, nullable, copy) NSString *unitID; -@property (nonatomic, nullable, copy) NSString *pricePoint; -@end - -@implementation GADRewardedVideoAdapterFluctStarter - -+ (void)setUpWithConfiguration:(GADMediationServerConfiguration *)configuration completionHandler:(GADMediationAdapterSetUpCompletionBlock)completionHandler { - NSMutableSet *params = [[NSMutableSet alloc] init]; - for (GADMediationCredentials *credential in configuration.credentials) { - NSString *param = [credential.settings valueForKey:GADCustomEventParametersServer]; - [params addObject:param]; - } - - if (params.count == 0) { - // custom event parameters がセットされていない - NSError *error = [NSError errorWithDomain:GADMFluctErrorDomain - code:GADMFluctErrorInvalidCustomParameters - userInfo:nil]; - completionHandler(error); - return; - } - - completionHandler(nil); -} - -+ (GADVersionNumber)adSDKVersion { - NSString *versionString = [FluctSDK version]; - NSArray<NSString *> *versionComponents = [versionString componentsSeparatedByString:@"."]; - GADVersionNumber version = {0}; - if (versionComponents.count == 3) { - version.majorVersion = [versionComponents[0] integerValue]; - version.minorVersion = [versionComponents[1] integerValue]; - version.patchVersion = [versionComponents[2] integerValue]; - } - return version; -} - -+ (nullable Class<GADAdNetworkExtras>)networkExtrasClass { - return [GADMAdapterFluctExtras class]; -} - -+ (GADVersionNumber)adapterVersion { - NSString *versionString = [FluctSDK version]; - NSArray<NSString *> *versionComponents = [versionString componentsSeparatedByString:@"."]; - GADVersionNumber version = {0}; - if (versionComponents.count == 3) { - version.majorVersion = [versionComponents[0] integerValue]; - version.minorVersion = [versionComponents[1] integerValue]; - version.patchVersion = [versionComponents[2] integerValue]; - } - - return version; -} - -- (void)loadRewardedAdForAdConfiguration:(GADMediationRewardedAdConfiguration *)adConfiguration - completionHandler:(GADMediationRewardedLoadCompletionHandler)completionHandler { - NSString *params = adConfiguration.credentials.settings[GADCustomEventParametersServer]; - NSArray<NSString *> *ids = [params componentsSeparatedByString:@","]; - if (ids.count == 3) { - self.groupID = ids[0]; - self.unitID = ids[1]; - self.pricePoint = ids[2]; - } - - if (!self.groupID || !self.unitID || !self.pricePoint) { - NSError *error = [NSError errorWithDomain:GADMFluctErrorDomain - code:GADMFluctErrorInvalidCustomParameters - userInfo:@{}]; - completionHandler(nil, error); - return; - } - - FSSConfigurationOptions *options = [FluctSDK currentConfigureOptions]; - options.mediationPlatformType = FSSMediationPlatformTypeGoogleMobileAds; - options.mediationPlatformSDKVersion = [NSString stringWithFormat:@"%s", GoogleMobileAdsVersionString]; - [FluctSDK configureWithOptions:options]; - - GADMAdapterFluctExtras *extras = adConfiguration.extras; - FSSRewardedVideoSetting *setting = [FSSRewardedVideoSetting defaultSetting]; - if (extras.setting) { - setting = extras.setting; - } - - self.completionHandler = completionHandler; - - self.starter = [[FSSRewardedVideoCustomEventStarter alloc] initWithGroupId:self.groupID unitId:self.unitID pricePoint:self.pricePoint]; - self.starter.delegate = self; - - [[GADAdapterFluctVideoDelegateProxy sharedInstance] registerDelegate:self - groupId:self.groupID - unitId:self.unitID]; - [self.starter requestWithSetting:setting - delegate:GADAdapterFluctVideoDelegateProxy.sharedInstance - rtbDelegate:GADAdapterFluctVideoDelegateProxy.sharedInstance]; -} - -- (void)presentFromViewController:(UIViewController *)viewController { - if ([self.starter hasAdAvailable]) { - [self.starter presentAdFromViewController:viewController]; - } -} - -#pragma mark - FSSRewardedVideoCustomEventStarterDelegate - -- (void)customEventNotFoundResponse:(FSSRewardedVideoCustomEventStarter *)customEvent { - if (self.completionHandler) { - NSError *error = [NSError errorWithDomain:GADMFluctErrorDomain - code:GADMFluctErrorInvalidCustomParameters - userInfo:@{}]; - self.completionHandler(nil, error); - self.completionHandler = nil; - } -} - -#pragma mark - GADAdapterFluctVideoDelegateProxyItem - -- (void)rewardedVideoDidLoadForGroupID:(NSString *)groupId unitId:(NSString *)unitId { - if (self.completionHandler) { - self.adEventDelegate = self.completionHandler(self, nil); - self.completionHandler = nil; - } -} - -- (void)rewardedVideoDidFailToLoadForGroupId:(NSString *)groupId unitId:(NSString *)unitId error:(NSError *)error { - if (self.completionHandler) { - NSError *err = [NSError errorWithDomain:GADMFluctErrorDomain - code:error.code - userInfo:error.userInfo]; - self.completionHandler(nil, err); - self.completionHandler = nil; - } -} - -- (void)rewardedVideoWillAppearForGroupId:(NSString *)groupId unitId:(NSString *)unitId { - [self.adEventDelegate willPresentFullScreenView]; -} - -- (void)rewardedVideoDidAppearForGroupId:(NSString *)groupId unitId:(NSString *)unitId { - [self.adEventDelegate didStartVideo]; -} - -- (void)rewardedVideoDidFailToPlayForGroupId:(NSString *)groupId unitId:(NSString *)unitId error:(NSError *)error { - NSError *err = [NSError errorWithDomain:GADMFluctErrorDomain - code:error.code - userInfo:error.userInfo]; - [self.adEventDelegate didFailToPresentWithError:err]; -} - -- (void)rewardedVideoShouldRewardForGroupID:(NSString *)groupId unitId:(NSString *)unitId { - [self.adEventDelegate didEndVideo]; - GADAdReward *rewardItem = [[GADAdReward alloc] initWithRewardType:@"" - rewardAmount:[NSDecimalNumber one]]; - [self.adEventDelegate didRewardUserWithReward:rewardItem]; -} - -- (void)rewardedVideoWillDisappearForGroupId:(NSString *)groupId unitId:(NSString *)unitId { - [self.adEventDelegate willDismissFullScreenView]; -} - -- (void)rewardedVideoDidDisappearForGroupId:(NSString *)groupId unitId:(NSString *)unitId { - [self.adEventDelegate didDismissFullScreenView]; -} - -- (void)rewardedVideoDidClickForGroupId:(NSString *)groupId unitId:(NSString *)unitId { - [self.adEventDelegate reportClick]; -} - -@end diff --git a/GoogleMobileAdsMediationFluctLegacy/GADVideoInterstitialAdapterFluct.h b/GoogleMobileAdsMediationFluctLegacy/GADVideoInterstitialAdapterFluct.h deleted file mode 100644 index 9d73407..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADVideoInterstitialAdapterFluct.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// GADVideoInterstitialAdapterFluct.h -// FluctSDK -// -// Copyright © 2019 fluct, Inc. All rights reserved. -// - -#import <Foundation/Foundation.h> -@import GoogleMobileAds; - -NS_ASSUME_NONNULL_BEGIN - -@interface GADVideoInterstitialAdapterFluct : NSObject <GADCustomEventInterstitial> -@end - -NS_ASSUME_NONNULL_END diff --git a/GoogleMobileAdsMediationFluctLegacy/GADVideoInterstitialAdapterFluct.m b/GoogleMobileAdsMediationFluctLegacy/GADVideoInterstitialAdapterFluct.m deleted file mode 100644 index 21fb43e..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADVideoInterstitialAdapterFluct.m +++ /dev/null @@ -1,100 +0,0 @@ -// -// GADVideoInterstitialAdapterFluct.m -// FluctSDK -// -// Copyright © 2019 fluct, Inc. All rights reserved. -// - -#import "GADVideoInterstitialAdapterFluct.h" -#import "GADMFluctError.h" - -@import FluctSDK; - -@interface GADVideoInterstitialAdapterFluct () <FSSVideoInterstitialDelegate, FSSVideoInterstitialRTBDelegate> -@property (nonatomic, nullable) NSString *groupID; -@property (nonatomic, nullable) NSString *unitID; -@property (nonatomic, nullable) FSSVideoInterstitial *videoInterstitial; -@end - -@implementation GADVideoInterstitialAdapterFluct - -@synthesize delegate; - -- (void)requestInterstitialAdWithParameter:(NSString *)serverParameter - label:(NSString *)serverLabel - request:(GADCustomEventRequest *)request { - NSError *error = nil; - if (![self setupAdapterWithParameter:serverParameter error:&error]) { - [self.delegate customEventInterstitial:self didFailAd:error]; - return; - } - - FSSConfigurationOptions *options = FSSConfigurationOptions.defaultOptions; - options.mediationPlatformType = FSSMediationPlatformTypeGoogleMobileAds; - options.mediationPlatformSDKVersion = [NSString stringWithFormat:@"%s", GoogleMobileAdsVersionString]; - [FluctSDK configureWithOptions:options]; - - self.videoInterstitial = [[FSSVideoInterstitial alloc] initWithGroupId:self.groupID - unitId:self.unitID - setting:[FSSVideoInterstitialSetting defaultSetting]]; - self.videoInterstitial.delegate = self; - self.videoInterstitial.rtbDelegate = self; - [self.videoInterstitial loadAd]; -} - -- (void)presentFromRootViewController:(UIViewController *)rootViewController { - if ([self.videoInterstitial hasAdAvailable]) { - [self.videoInterstitial presentAdFromViewController:rootViewController]; - } -} - -#pragma mark - setup -- (BOOL)setupAdapterWithParameter:(NSString *)serverParameter error:(NSError **)error { - NSArray<NSString *> *ids = [serverParameter componentsSeparatedByString:@","]; - if (ids.count != 2) { - if (error) { - *error = [NSError errorWithDomain:GADMFluctErrorDomain - code:GADMFluctErrorInvalidCustomParameters - userInfo:@{}]; - } - return NO; - } - - self.groupID = ids.firstObject; - self.unitID = ids.lastObject; - return YES; -} - -#pragma mark - FSSVideoInterstitialDelegate -- (void)videoInterstitialDidLoad:(FSSVideoInterstitial *)interstitial { - [self.delegate customEventInterstitialDidReceiveAd:self]; -} - -- (void)videoInterstitial:(FSSVideoInterstitial *)interstitial didFailToLoadWithError:(NSError *)error { - [self.delegate customEventInterstitial:self didFailAd:error]; -} - -- (void)videoInterstitialWillAppear:(FSSVideoInterstitial *)interstitial { - [self.delegate customEventInterstitialWillPresent:self]; -} - -- (void)videoInterstitialDidAppear:(FSSVideoInterstitial *)interstitial { -} - -- (void)videoInterstitialWillDisappear:(FSSVideoInterstitial *)interstitial { - [self.delegate customEventInterstitialWillDismiss:self]; -} - -- (void)videoInterstitialDidDisappear:(FSSVideoInterstitial *)interstitial { - [self.delegate customEventInterstitialDidDismiss:self]; -} - -- (void)videoInterstitial:(FSSVideoInterstitial *)interstitial didFailToPlayWithError:(NSError *)error { - [self.delegate customEventInterstitial:self didFailAd:error]; -} - -- (void)videoInterstitialDidClick:(FSSVideoInterstitial *)interstitial { - [self.delegate customEventInterstitialWasClicked:self]; -} - -@end diff --git a/GoogleMobileAdsMediationFluctLegacy/GADVideoInterstitialAdapterFluctOptimizer.h b/GoogleMobileAdsMediationFluctLegacy/GADVideoInterstitialAdapterFluctOptimizer.h deleted file mode 100644 index 98a9db4..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADVideoInterstitialAdapterFluctOptimizer.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// GADVideoInterstitialAdapterFluctOptimizer.h -// FluctSDK -// -// Copyright © 2020 fluct, Inc. All rights reserved. -// - -#import <Foundation/Foundation.h> -#import <GoogleMobileAds/GoogleMobileAds.h> - -NS_ASSUME_NONNULL_BEGIN - -@interface GADVideoInterstitialAdapterFluctOptimizer : NSObject <GADCustomEventInterstitial> -@end - -NS_ASSUME_NONNULL_END diff --git a/GoogleMobileAdsMediationFluctLegacy/GADVideoInterstitialAdapterFluctOptimizer.m b/GoogleMobileAdsMediationFluctLegacy/GADVideoInterstitialAdapterFluctOptimizer.m deleted file mode 100644 index eb2d77f..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADVideoInterstitialAdapterFluctOptimizer.m +++ /dev/null @@ -1,111 +0,0 @@ -// -// GADVideoInterstitialAdapterFluctOptimizer.m -// FluctSDK -// -// Copyright © 2020 fluct, Inc. All rights reserved. -// - -#import "GADVideoInterstitialAdapterFluctOptimizer.h" -#import "GADMFluctError.h" -#import <FluctSDK/FluctSDK.h> - -@interface GADVideoInterstitialAdapterFluctOptimizer () <FSSVideoInterstitialDelegate, FSSVideoInterstitialRTBDelegate, FSSVideoInterstitialCustomEventOptimizerDelegate> -@property (nonatomic, nullable) NSString *groupID; -@property (nonatomic, nullable) NSString *unitID; -@property (nonatomic, nullable) NSString *pricePoint; -@property (nonatomic, nullable) FSSVideoInterstitialCustomEventOptimizer *optimizer; -@end - -@implementation GADVideoInterstitialAdapterFluctOptimizer - -@synthesize delegate; - -- (void)requestInterstitialAdWithParameter:(nullable NSString *)serverParameter - label:(nullable NSString *)serverLabel - request:(nonnull GADCustomEventRequest *)request { - NSError *error = nil; - if (![self setupAdapterWithParameter:serverParameter error:&error]) { - [self.delegate customEventInterstitial:self didFailAd:error]; - return; - } - - FSSConfigurationOptions *options = FSSConfigurationOptions.defaultOptions; - options.mediationPlatformType = FSSMediationPlatformTypeGoogleMobileAds; - options.mediationPlatformSDKVersion = [NSString stringWithFormat:@"%s", GoogleMobileAdsVersionString]; - [FluctSDK configureWithOptions:options]; - - self.optimizer = [[FSSVideoInterstitialCustomEventOptimizer alloc] initWithGroupId:self.groupID unitId:self.unitID pricePoint:self.pricePoint]; - self.optimizer.delegate = self; - - FSSVideoInterstitialSetting *setting = [FSSVideoInterstitialSetting defaultSetting]; - [self.optimizer requestWithSetting:setting delegate:self rtbDelegate:self]; -} - -- (void)presentFromRootViewController:(nonnull UIViewController *)rootViewController { - if ([self.optimizer hasAdAvailable]) { - [self.optimizer presentAdFromViewController:rootViewController]; - } -} - -#pragma mark - setup - -- (BOOL)setupAdapterWithParameter:(NSString *)serverParameter error:(NSError **)error { - NSArray<NSString *> *ids = [serverParameter componentsSeparatedByString:@","]; - if (ids.count != 3) { - if (error) { - *error = [NSError errorWithDomain:GADMFluctErrorDomain - code:GADMFluctErrorInvalidCustomParameters - userInfo:@{}]; - } - return NO; - } - - self.groupID = ids[0]; - self.unitID = ids[1]; - self.pricePoint = ids[2]; - return YES; -} - -#pragma mark - FSSVideoInterstitialCustomEventOptimizerDelegate - -- (void)customEventNotFoundResponse:(FSSVideoInterstitialCustomEventOptimizer *)customEvent { - NSError *error = [NSError errorWithDomain:GADMFluctErrorDomain - code:GADMFluctErrorNoResponse - userInfo:nil]; - [self.delegate customEventInterstitial:self didFailAd:error]; -} - -#pragma mark - FSSVideoInterstitialDelegate - -- (void)videoInterstitialDidLoad:(FSSVideoInterstitial *)interstitial { - [self.delegate customEventInterstitialDidReceiveAd:self]; -} - -- (void)videoInterstitial:(FSSVideoInterstitial *)interstitial didFailToLoadWithError:(NSError *)error { - [self.delegate customEventInterstitial:self didFailAd:error]; -} - -- (void)videoInterstitialWillAppear:(FSSVideoInterstitial *)interstitial { - [self.delegate customEventInterstitialWillPresent:self]; -} - -- (void)videoInterstitialDidAppear:(FSSVideoInterstitial *)interstitial { -} - -- (void)videoInterstitialWillDisappear:(FSSVideoInterstitial *)interstitial { - [self.delegate customEventInterstitialWillDismiss:self]; -} - -- (void)videoInterstitialDidDisappear:(FSSVideoInterstitial *)interstitial { - [self.delegate customEventInterstitialDidDismiss:self]; -} - -- (void)videoInterstitial:(FSSVideoInterstitial *)interstitial didFailToPlayWithError:(NSError *)error { - [self.delegate customEventInterstitial:self didFailAd:error]; -} - -- (void)videoInterstitialDidClick:(FSSVideoInterstitial *)interstitial { - [self.delegate customEventInterstitialWasClicked:self]; -} - -@end diff --git a/GoogleMobileAdsMediationFluctLegacy/GADVideoInterstitialAdapterFluctStarter.h b/GoogleMobileAdsMediationFluctLegacy/GADVideoInterstitialAdapterFluctStarter.h deleted file mode 100644 index 2385244..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADVideoInterstitialAdapterFluctStarter.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// GADVideoInterstitialAdapterFluctStarter.h -// FluctSDK -// -// Copyright © 2020 fluct, Inc. All rights reserved. -// - -#import <Foundation/Foundation.h> -#import <GoogleMobileAds/GoogleMobileAds.h> - -NS_ASSUME_NONNULL_BEGIN - -@interface GADVideoInterstitialAdapterFluctStarter : NSObject <GADCustomEventInterstitial> -@end - -NS_ASSUME_NONNULL_END diff --git a/GoogleMobileAdsMediationFluctLegacy/GADVideoInterstitialAdapterFluctStarter.m b/GoogleMobileAdsMediationFluctLegacy/GADVideoInterstitialAdapterFluctStarter.m deleted file mode 100644 index c190341..0000000 --- a/GoogleMobileAdsMediationFluctLegacy/GADVideoInterstitialAdapterFluctStarter.m +++ /dev/null @@ -1,114 +0,0 @@ -// -// GADVideoInterstitialAdapterFluctStarter.m -// FluctSDK -// -// Copyright © 2020 fluct, Inc. All rights reserved. -// - -#import "GADVideoInterstitialAdapterFluctStarter.h" -#import "GADMFluctError.h" -#import <FluctSDK/FluctSDK.h> - -@interface GADVideoInterstitialAdapterFluctStarter () <FSSVideoInterstitialDelegate, FSSVideoInterstitialRTBDelegate, FSSVideoInterstitialCustomEventStarterDelegate> -@property (nonatomic, nullable) NSString *groupID; -@property (nonatomic, nullable) NSString *unitID; -@property (nonatomic, nullable) NSString *pricePoint; -@property (nonatomic, nullable) FSSVideoInterstitialCustomEventStarter *starter; -@end - -@implementation GADVideoInterstitialAdapterFluctStarter - -@synthesize delegate; - -- (void)requestInterstitialAdWithParameter:(NSString *)serverParameter - label:(NSString *)serverLabel - request:(GADCustomEventRequest *)request { - - NSError *error = nil; - if (![self setupAdapterWithParameter:serverParameter error:&error]) { - [self.delegate customEventInterstitial:self didFailAd:error]; - return; - } - - FSSConfigurationOptions *options = FSSConfigurationOptions.defaultOptions; - options.mediationPlatformType = FSSMediationPlatformTypeGoogleMobileAds; - options.mediationPlatformSDKVersion = [NSString stringWithFormat:@"%s", GoogleMobileAdsVersionString]; - [FluctSDK configureWithOptions:options]; - - self.starter = [[FSSVideoInterstitialCustomEventStarter alloc] initWithGroupId:self.groupID unitId:self.unitID pricePoint:self.pricePoint]; - self.starter.delegate = self; - - FSSVideoInterstitialSetting *setting = [FSSVideoInterstitialSetting defaultSetting]; - [self.starter requestWithSetting:setting delegate:self rtbDelegate:self]; -} - -- (void)presentFromRootViewController:(nonnull UIViewController *)rootViewController { - if ([self.starter hasAdAvailable]) { - [self.starter presentAdFromViewController:rootViewController]; - } -} - -#pragma mark - FSSVideoInterstitialCustomEventStarterDelegate - -- (void)customEventNotFoundResponse:(FSSVideoInterstitialCustomEventStarter *)customEvent { - NSError *error = [NSError errorWithDomain:GADMFluctErrorDomain - code:GADMFluctErrorNoResponse - userInfo:nil]; - [self.delegate customEventInterstitial:self didFailAd:error]; -} - -#pragma mark - setup - -- (BOOL)setupAdapterWithParameter:(NSString *)serverParameter error:(NSError **)error { - NSArray<NSString *> *ids = [serverParameter componentsSeparatedByString:@","]; - if (ids.count != 3) { - if (error) { - *error = [NSError errorWithDomain:GADMFluctErrorDomain - code:GADMFluctErrorInvalidCustomParameters - userInfo:@{}]; - } - return NO; - } - - self.groupID = ids[0]; - self.unitID = ids[1]; - self.pricePoint = ids[2]; - return YES; -} - -#pragma mark - FSSVideoInterstitialDelegate - -- (void)videoInterstitialDidLoad:(FSSVideoInterstitial *)interstitial { - [self.delegate customEventInterstitialDidReceiveAd:self]; -} - -- (void)videoInterstitial:(FSSVideoInterstitial *)interstitial didFailToLoadWithError:(NSError *)error { - [self.delegate customEventInterstitial:self didFailAd:error]; -} - -- (void)videoInterstitialWillAppear:(FSSVideoInterstitial *)interstitial { - [self.delegate customEventInterstitialWillPresent:self]; -} - -- (void)videoInterstitialDidAppear:(FSSVideoInterstitial *)interstitial { -} - -- (void)videoInterstitialWillDisappear:(FSSVideoInterstitial *)interstitial { - [self.delegate customEventInterstitialWillDismiss:self]; -} - -- (void)videoInterstitialDidDisappear:(FSSVideoInterstitial *)interstitial { - [self.delegate customEventInterstitialDidDismiss:self]; -} - -- (void)videoInterstitial:(FSSVideoInterstitial *)interstitial didFailToPlayWithError:(NSError *)error { - [self.delegate customEventInterstitial:self didFailAd:error]; -} - -#pragma mark - FSSVideoInterstitialRTBDelegate - -- (void)videoInterstitialDidClick:(FSSVideoInterstitial *)interstitial { - [self.delegate customEventInterstitialWasClicked:self]; -} - -@end diff --git a/MaxMediationAdapterFluct.podspec b/MaxMediationAdapterFluct.podspec index f2cd5fe..5bc710b 100644 --- a/MaxMediationAdapterFluct.podspec +++ b/MaxMediationAdapterFluct.podspec @@ -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.27.3" + s.version = "6.27.4" s.author = "fluct,Inc." s.requires_arc = true s.static_framework = true diff --git a/SampleApp/Objective-C/Podfile.lock b/SampleApp/Objective-C/Podfile.lock index af97870..e8d8075 100644 --- a/SampleApp/Objective-C/Podfile.lock +++ b/SampleApp/Objective-C/Podfile.lock @@ -39,33 +39,33 @@ PODS: - BURelyFoundation_Global/Zip (0.1.1.0): - BURelyFoundation_Global/Foundation - FiveAd (2.6.20230609) - - FluctSDK (6.27.3) - - FluctSDK-MediationAdapter/AdColony (6.27.3): + - FluctSDK (6.27.4) + - FluctSDK-MediationAdapter/AdColony (6.27.4): - AdColony (>= 4.9.0) - FluctSDK (>= 6.14.0) - - FluctSDK-MediationAdapter/AMoAd (6.27.3): + - FluctSDK-MediationAdapter/AMoAd (6.27.4): - FluctSDK (>= 6.14.0) - ReachabilitySwift - SnapKit - - FluctSDK-MediationAdapter/AppLovin (6.27.3): + - FluctSDK-MediationAdapter/AppLovin (6.27.4): - AppLovinSDK (>= 11.11.1) - FluctSDK (>= 6.14.0) - - FluctSDK-MediationAdapter/Five (6.27.3): + - FluctSDK-MediationAdapter/Five (6.27.4): - FiveAd (>= 2.6.20230609) - FluctSDK (>= 6.14.0) - - FluctSDK-MediationAdapter/maio (6.27.3): + - FluctSDK-MediationAdapter/maio (6.27.4): - FluctSDK (>= 6.14.0) - MaioSDK (>= 1.6.3) - - FluctSDK-MediationAdapter/nend (6.27.3): + - FluctSDK-MediationAdapter/nend (6.27.4): - FluctSDK (>= 6.14.0) - NendSDK_iOS (>= 8.0.1) - - FluctSDK-MediationAdapter/Pangle (6.27.3): + - FluctSDK-MediationAdapter/Pangle (6.27.4): - Ads-Global (>= 5.2.1.1) - FluctSDK (>= 6.14.0) - - FluctSDK-MediationAdapter/Tapjoy (6.27.3): + - FluctSDK-MediationAdapter/Tapjoy (6.27.4): - FluctSDK (>= 6.14.0) - TapjoySDK (>= 13.0.1) - - FluctSDK-MediationAdapter/UnityAds (6.27.3): + - FluctSDK-MediationAdapter/UnityAds (6.27.4): - FluctSDK (>= 6.14.0) - UnityAds (>= 4.7.1) - Google-Mobile-Ads-SDK (10.4.0): @@ -91,7 +91,7 @@ PODS: - GoogleUtilities/Network (~> 7.8) - "GoogleUtilities/NSData+zlib (~> 7.8)" - nanopb (< 2.30910.0, >= 2.30908.0) - - GoogleMobileAdsMediationFluct (6.27.3): + - GoogleMobileAdsMediationFluct (6.27.4): - FluctSDK (>= 6.12.1) - Google-Mobile-Ads-SDK (>= 9.8.0) - GoogleUserMessagingPlatform (2.0.1) @@ -113,7 +113,7 @@ PODS: - GoogleUtilities/Reachability (7.11.1): - GoogleUtilities/Logger - MaioSDK (1.6.3) - - MaxMediationAdapterFluct (6.27.3): + - MaxMediationAdapterFluct (6.27.4): - AppLovinSDK (>= 11.4.2) - FluctSDK (>= 6.19.0) - nanopb (2.30909.0): @@ -183,15 +183,15 @@ SPEC CHECKSUMS: AppLovinSDK: f7c78880f52ee909c9b31a12a52ab579ef29edf1 BURelyFoundation_Global: a36d52a06d1798c0309fbeaa1a95692050e2e75f FiveAd: c4f9e70545cbabba51307b5529e8cfcf3e8cbb03 - FluctSDK: a7f5dacea962717b19326fb736799707b864cd0c - FluctSDK-MediationAdapter: 776c1e31519cf7f0f0d54c9693689743d029dd20 + FluctSDK: 347cbd94b3df4463ad58cfa6038116c84e326cef + FluctSDK-MediationAdapter: 496655299efb5d88e850fdf4d954604d8f3feec3 Google-Mobile-Ads-SDK: 32fe7836431a06a29f7734ae092b600137c8108d GoogleAppMeasurement: 0ba93018e916f7badf915c2337d43cc1fa96b3f9 - GoogleMobileAdsMediationFluct: 269644bfc4e7eb4388f8f19743f3da30b9d8fdc5 + GoogleMobileAdsMediationFluct: 53fab0dd767eec694757795a7f4ec8c6616effc2 GoogleUserMessagingPlatform: 5f8b30daf181805317b6b985bb51c1ff3beca054 GoogleUtilities: 9aa0ad5a7bc171f8bae016300bfcfa3fb8425749 MaioSDK: a66f3974f8edb8053077b937c00081621d7142a6 - MaxMediationAdapterFluct: 2bd2fc206e3945fcddb992e5edecc2d0d5f8d1a6 + MaxMediationAdapterFluct: d3befcf41e6e1e00dc0d392ca37ad5f82dc625d6 nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431 NendSDK_iOS: ece43e55b584cc7ab06ac0b75c6506de79fea3fd PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef diff --git a/SampleApp/Swift/Podfile.lock b/SampleApp/Swift/Podfile.lock index 7661080..4515675 100644 --- a/SampleApp/Swift/Podfile.lock +++ b/SampleApp/Swift/Podfile.lock @@ -39,33 +39,33 @@ PODS: - BURelyFoundation_Global/Zip (0.1.1.0): - BURelyFoundation_Global/Foundation - FiveAd (2.6.20230609) - - FluctSDK (6.27.3) - - FluctSDK-MediationAdapter/AdColony (6.27.3): + - FluctSDK (6.27.4) + - FluctSDK-MediationAdapter/AdColony (6.27.4): - AdColony (>= 4.9.0) - FluctSDK (>= 6.14.0) - - FluctSDK-MediationAdapter/AMoAd (6.27.3): + - FluctSDK-MediationAdapter/AMoAd (6.27.4): - FluctSDK (>= 6.14.0) - ReachabilitySwift - SnapKit - - FluctSDK-MediationAdapter/AppLovin (6.27.3): + - FluctSDK-MediationAdapter/AppLovin (6.27.4): - AppLovinSDK (>= 11.11.1) - FluctSDK (>= 6.14.0) - - FluctSDK-MediationAdapter/Five (6.27.3): + - FluctSDK-MediationAdapter/Five (6.27.4): - FiveAd (>= 2.6.20230609) - FluctSDK (>= 6.14.0) - - FluctSDK-MediationAdapter/maio (6.27.3): + - FluctSDK-MediationAdapter/maio (6.27.4): - FluctSDK (>= 6.14.0) - MaioSDK (>= 1.6.3) - - FluctSDK-MediationAdapter/nend (6.27.3): + - FluctSDK-MediationAdapter/nend (6.27.4): - FluctSDK (>= 6.14.0) - NendSDK_iOS (>= 8.0.1) - - FluctSDK-MediationAdapter/Pangle (6.27.3): + - FluctSDK-MediationAdapter/Pangle (6.27.4): - Ads-Global (>= 5.2.1.1) - FluctSDK (>= 6.14.0) - - FluctSDK-MediationAdapter/Tapjoy (6.27.3): + - FluctSDK-MediationAdapter/Tapjoy (6.27.4): - FluctSDK (>= 6.14.0) - TapjoySDK (>= 13.0.1) - - FluctSDK-MediationAdapter/UnityAds (6.27.3): + - FluctSDK-MediationAdapter/UnityAds (6.27.4): - FluctSDK (>= 6.14.0) - UnityAds (>= 4.7.1) - Google-Mobile-Ads-SDK (10.4.0): @@ -91,7 +91,7 @@ PODS: - GoogleUtilities/Network (~> 7.8) - "GoogleUtilities/NSData+zlib (~> 7.8)" - nanopb (< 2.30910.0, >= 2.30908.0) - - GoogleMobileAdsMediationFluct (6.27.3): + - GoogleMobileAdsMediationFluct (6.27.4): - FluctSDK (>= 6.12.1) - Google-Mobile-Ads-SDK (>= 9.8.0) - GoogleUserMessagingPlatform (2.0.1) @@ -113,7 +113,7 @@ PODS: - GoogleUtilities/Reachability (7.11.1): - GoogleUtilities/Logger - MaioSDK (1.6.3) - - MaxMediationAdapterFluct (6.27.3): + - MaxMediationAdapterFluct (6.27.4): - AppLovinSDK (>= 11.4.2) - FluctSDK (>= 6.19.0) - nanopb (2.30909.0): @@ -183,15 +183,15 @@ SPEC CHECKSUMS: AppLovinSDK: f7c78880f52ee909c9b31a12a52ab579ef29edf1 BURelyFoundation_Global: a36d52a06d1798c0309fbeaa1a95692050e2e75f FiveAd: c4f9e70545cbabba51307b5529e8cfcf3e8cbb03 - FluctSDK: a7f5dacea962717b19326fb736799707b864cd0c - FluctSDK-MediationAdapter: 776c1e31519cf7f0f0d54c9693689743d029dd20 + FluctSDK: 347cbd94b3df4463ad58cfa6038116c84e326cef + FluctSDK-MediationAdapter: 496655299efb5d88e850fdf4d954604d8f3feec3 Google-Mobile-Ads-SDK: 32fe7836431a06a29f7734ae092b600137c8108d GoogleAppMeasurement: 0ba93018e916f7badf915c2337d43cc1fa96b3f9 - GoogleMobileAdsMediationFluct: 269644bfc4e7eb4388f8f19743f3da30b9d8fdc5 + GoogleMobileAdsMediationFluct: 53fab0dd767eec694757795a7f4ec8c6616effc2 GoogleUserMessagingPlatform: 5f8b30daf181805317b6b985bb51c1ff3beca054 GoogleUtilities: 9aa0ad5a7bc171f8bae016300bfcfa3fb8425749 MaioSDK: a66f3974f8edb8053077b937c00081621d7142a6 - MaxMediationAdapterFluct: 2bd2fc206e3945fcddb992e5edecc2d0d5f8d1a6 + MaxMediationAdapterFluct: d3befcf41e6e1e00dc0d392ca37ad5f82dc625d6 nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431 NendSDK_iOS: ece43e55b584cc7ab06ac0b75c6506de79fea3fd PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef