diff --git a/Yandex/AppLovinMediationYandexAdapter.podspec b/Yandex/AppLovinMediationYandexAdapter.podspec index 9070fb306f7..a300a56411c 100644 --- a/Yandex/AppLovinMediationYandexAdapter.podspec +++ b/Yandex/AppLovinMediationYandexAdapter.podspec @@ -2,7 +2,7 @@ Pod::Spec.new do |s| s.authors = 'AppLovin Corporation' s.name = 'AppLovinMediationYandexAdapter' -s.version = '6.1.0.3' +s.version = '7.0.0.0' s.platform = :ios, '13.0' s.summary = 'Yandex adapter used for mediation with the AppLovin MAX SDK' s.homepage = "https://github.com/CocoaPods/Specs/search?o=desc&q=#{s.name}&s=indexed" @@ -26,14 +26,14 @@ s.source = s.vendored_frameworks = "#{s.name}-#{s.version}/#{s.name}.xcframework" -s.dependency 'YandexMobileAds', '= 6.1.0' -# Newer versions of DivKit do not work with YandexMobileAds. Try to remove this when updating Yandex. -s.dependency 'DivKit', '= 28.4.0' -# Newer versions of VGSL don't work with YandexMobileAds. Try to remove this when updating Yandex. -s.dependency 'VGSLCommonCore', '= 2.3.0' -s.dependency 'VGSLNetworking', '= 2.3.0' +s.dependency 'YandexMobileAds', '= 7.0.0' s.dependency 'AppLovinSDK' -s.swift_version = '5.7' +s.swift_version = '5.9' + +s.pod_target_xcconfig = +{ + 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'x86_64' +} s.description = <<-DESC diff --git a/Yandex/CHANGELOG.md b/Yandex/CHANGELOG.md index d6987afa1e9..61383810a9e 100644 --- a/Yandex/CHANGELOG.md +++ b/Yandex/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 7.0.0.0 +* Certified with Yandex SDK 7.0.0. +* Update to use new APIs for signal collection and SDK version retrieval. +* Update to use new impression callback, `didTrackImpressionWith:`, for rewarded ads. +* Remove deprecated callbacks `didStartRewardedAdVideo` and `didCompleteRewardedAdVideo`. +* Updated minimum Xcode requirement to 15.0. + ## 6.1.0.3 * Specified compatible version of Yandex dependency for republished SDK 6.1.0: VGSLCommonCore and VGSLNetworking (2.3.0). diff --git a/Yandex/YandexAdapter.xcodeproj/project.pbxproj b/Yandex/YandexAdapter.xcodeproj/project.pbxproj index 00972d9edbd..4484e7ad45d 100644 --- a/Yandex/YandexAdapter.xcodeproj/project.pbxproj +++ b/Yandex/YandexAdapter.xcodeproj/project.pbxproj @@ -302,6 +302,7 @@ DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = X8JXXK4FF5; ENABLE_BITCODE = NO; + EXCLUDED_ARCHS = x86_64; FRAMEWORK_SEARCH_PATHS = ( "$PROJECT_DIR/../../iOS-Workspace/Pods/**", "$(inherited)", @@ -329,6 +330,7 @@ DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = X8JXXK4FF5; ENABLE_BITCODE = NO; + EXCLUDED_ARCHS = x86_64; FRAMEWORK_SEARCH_PATHS = ( "$PROJECT_DIR/../../iOS-Workspace/Pods/**", "$(inherited)", diff --git a/Yandex/YandexAdapter/ALYandexMediationAdapter.m b/Yandex/YandexAdapter/ALYandexMediationAdapter.m index 5a2e144f01c..a2a85291c5e 100644 --- a/Yandex/YandexAdapter/ALYandexMediationAdapter.m +++ b/Yandex/YandexAdapter/ALYandexMediationAdapter.m @@ -9,7 +9,7 @@ #import "ALYandexMediationAdapter.h" #import -#define ADAPTER_VERSION @"6.1.0.3" +#define ADAPTER_VERSION @"7.0.0.0" /** * Dedicated delegate object for Yandex interstitial ads. @@ -86,7 +86,7 @@ + (void)initialize - (NSString *)SDKVersion { - return [YMAMobileAds SDKVersion]; + return [YMAMobileAds sdkVersion]; } - (NSString *)adapterVersion @@ -136,7 +136,9 @@ - (void)collectSignalWithParameters:(id)parameters { [self log: @"Collecting signal..."]; - [ALYandexBidderTokenLoader loadBidderTokenWithCompletionHandler:^(NSString *bidderToken) { + YMABidderTokenRequestConfiguration *configuration = [[YMABidderTokenRequestConfiguration alloc] initWithAdType: [self toYandexAdType: parameters.adFormat]]; + + [ALYandexBidderTokenLoader loadBidderTokenWithRequestConfiguration: configuration completionHandler:^(NSString *bidderToken) { [self log: @"Collected signal"]; [delegate didCollectSignal: bidderToken]; }]; @@ -309,6 +311,25 @@ - (YMABannerAdSize *)adSizeFromAdFormat:(MAAdFormat *)adFormat return [YMABannerAdSize fixedSizeWithWidth: adFormat.size.width height: adFormat.size.height]; } +- (YMAAdType)toYandexAdType:(MAAdFormat *)adFormat +{ + if ( adFormat == MAAdFormat.interstitial ) + { + return YMAAdTypeInterstitial; + } + else if ( adFormat == MAAdFormat.rewarded ) + { + return YMAAdTypeRewarded; + } + else if ( [adFormat isAdViewAd] ) + { + return YMAAdTypeBanner; + } + + [NSException raise: NSInvalidArgumentException format: @"Unsupported ad format: %@", adFormat]; + return -1; +} + + (MAAdapterError *)toMaxError:(NSError *)yandexError { YMAAdErrorCode yandexErrorCode = yandexError.code; @@ -473,17 +494,15 @@ - (void)rewardedAdDidShow:(YMARewardedAd *)rewardedAd if ( [self.parameters isTesting] ) { [self.delegate didDisplayRewardedAd]; - [self.delegate didStartRewardedAdVideo]; } } // Note: This method is generally called with a 3 second delay after the ad has been displayed. // This method is not called for test mode ads. -- (void)rewardedAd:(YMARewardedAd *)rewardedAd didTrackImpressionWithData:(nullable id)impressionData +- (void)rewardedAd:(YMARewardedAd *)rewardedAd didTrackImpressionWith:(id)impressionData { [self.parentAdapter log: @"Rewarded ad impression tracked"]; [self.delegate didDisplayRewardedAd]; - [self.delegate didStartRewardedAdVideo]; } - (void)rewardedAd:(YMARewardedAd *)rewardedAd didFailToShowWithError:(NSError *)error @@ -515,7 +534,6 @@ - (void)rewardedAd:(YMARewardedAd *)rewardedAd didReward:(id)reward - (void)rewardedAdDidDismiss:(YMARewardedAd *)rewardedAd { [self.parentAdapter log: @"Rewarded ad hidden"]; - [self.delegate didCompleteRewardedAdVideo]; if ( [self hasGrantedReward] || [self.parentAdapter shouldAlwaysRewardUser] ) {