-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c68a67c
commit fd44555
Showing
21 changed files
with
178 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+0 Bytes
(100%)
FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64/FluctSDK.framework/FluctSDK
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
FluctSDK.embeddedframework/FluctSDK.xcframework/ios-arm64/FluctSDK.framework/Info.plist
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...ddedframework/FluctSDK.xcframework/ios-arm64_x86_64-simulator/FluctSDK.framework/FluctSDK
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...edframework/FluctSDK.xcframework/ios-arm64_x86_64-simulator/FluctSDK.framework/Info.plist
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...DK.xcframework/ios-arm64_x86_64-simulator/FluctSDK.framework/_CodeSignature/CodeDirectory
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...framework/ios-arm64_x86_64-simulator/FluctSDK.framework/_CodeSignature/CodeRequirements-1
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+0 Bytes
(100%)
FluctSDK.embeddedframework/Resources/FluctSDKResources.bundle/Info.plist
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.