From 350d1c49ea79faf506b8e861186d63d98fcb9d5b Mon Sep 17 00:00:00 2001 From: mobile-ads-github <31896236+mobile-ads-github@users.noreply.github.com> Date: Fri, 14 Jul 2023 17:13:43 +0300 Subject: [PATCH] Release 5.9.0 (#167) --- .../project.pbxproj | 54 ++++++- .../Adfox/AdFoxBannerViewController.swift | 2 +- .../Common/NavigationScreenDataSource.swift | 6 + .../NavigationTableViewController.swift | 21 +++ .../Common/String+Extensions.swift | 10 ++ .../MobileMediationBannerViewController.swift | 2 +- ...IronSourceInterstitialViewController.swift | 32 ++-- .../IronSource/IronSourceManager.swift | 54 +------ .../IronSourceRewardedViewController.swift | 30 ++-- .../Yandex/Banner/BannerViewController.swift | 2 +- .../Banner/InlineBannerViewController.swift | 99 +++++++++++++ .../Banner/StickyBannerViewController.swift | 88 +++++++++++ .../Instream/InstreamListViewController.swift | 28 ++++ .../InterstitialAdViewController.swift | 123 ++++++++++++++++ .../Yandex/Native/NativeViewController.swift | 28 ++++ .../Rewarded/RewardedAdViewController.swift | 137 ++++++++++++++++++ .../Yandex/YandexAdsViewController.swift | 40 +++++ .../adapter/admob-mobileads/CHANGELOG.md | 7 + .../adapter/ironsource-mobileads/CHANGELOG.md | 7 +- .../mediation/mobileads-adcolony/CHANGELOG.md | 5 + .../mediation/mobileads-admob/CHANGELOG.md | 7 + .../mediation/mobileads-applovin/CHANGELOG.md | 5 + .../mediation/mobileads-bigoads/CHANGELOG.md | 7 + .../mobileads-chartboost/CHANGELOG.md | 7 + .../mobileads-ironsource/CHANGELOG.md | 5 + .../mobileads-mintegral/CHANGELOG.md | 7 + .../mediation/mobileads-mytarget/CHANGELOG.md | 5 + .../mediation/mobileads-unityads/CHANGELOG.md | 7 + changelog/mobileads/CHANGELOG.md | 5 + 29 files changed, 741 insertions(+), 89 deletions(-) create mode 100644 Examples/YandexMobileAdsExample/YandexMobileAdsExample/Common/NavigationScreenDataSource.swift create mode 100644 Examples/YandexMobileAdsExample/YandexMobileAdsExample/Common/NavigationTableViewController.swift create mode 100644 Examples/YandexMobileAdsExample/YandexMobileAdsExample/Common/String+Extensions.swift create mode 100644 Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Banner/InlineBannerViewController.swift create mode 100644 Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Banner/StickyBannerViewController.swift create mode 100644 Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Instream/InstreamListViewController.swift create mode 100644 Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Interstitial/InterstitialAdViewController.swift create mode 100644 Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Native/NativeViewController.swift create mode 100644 Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Rewarded/RewardedAdViewController.swift create mode 100644 Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/YandexAdsViewController.swift diff --git a/Examples/YandexMobileAdsExample/YandexMobileAdsExample.xcodeproj/project.pbxproj b/Examples/YandexMobileAdsExample/YandexMobileAdsExample.xcodeproj/project.pbxproj index f322c74..e1d52e7 100644 --- a/Examples/YandexMobileAdsExample/YandexMobileAdsExample.xcodeproj/project.pbxproj +++ b/Examples/YandexMobileAdsExample/YandexMobileAdsExample.xcodeproj/project.pbxproj @@ -61,6 +61,16 @@ 46C354A2282560FE00832C7C /* IronSourceManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46C3549F282560FE00832C7C /* IronSourceManager.swift */; }; 70011FE6B068EC271A1051CB /* libPods-YandexMobileAdsExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A35F1D3A95F5CC1C05B0ED57 /* libPods-YandexMobileAdsExample.a */; }; B394AC8627A868DB00D92CD9 /* AdPlayerErrorConverter.swift in Sources */ = {isa = PBXBuildFile; fileRef = B394AC8527A868DB00D92CD9 /* AdPlayerErrorConverter.swift */; }; + DEC81ADA2A53A89B008FE935 /* YandexAdsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEC81AD92A53A89B008FE935 /* YandexAdsViewController.swift */; }; + DEC81ADC2A53B9E7008FE935 /* String+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEC81ADB2A53B9E7008FE935 /* String+Extensions.swift */; }; + DEC81ADE2A53BE28008FE935 /* InstreamListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEC81ADD2A53BE28008FE935 /* InstreamListViewController.swift */; }; + DEC81AE02A53C28D008FE935 /* NavigationTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEC81ADF2A53C28D008FE935 /* NavigationTableViewController.swift */; }; + DEC81AE22A53C840008FE935 /* NativeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEC81AE12A53C840008FE935 /* NativeViewController.swift */; }; + DEC81AE42A53C945008FE935 /* NavigationScreenDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEC81AE32A53C945008FE935 /* NavigationScreenDataSource.swift */; }; + DEC81AE62A54D5A3008FE935 /* StickyBannerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEC81AE52A54D5A3008FE935 /* StickyBannerViewController.swift */; }; + DEC81AE82A54D8DE008FE935 /* InlineBannerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEC81AE72A54D8DE008FE935 /* InlineBannerViewController.swift */; }; + DEC81AEC2A55A2F6008FE935 /* RewardedAdViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEC81AEB2A55A2F6008FE935 /* RewardedAdViewController.swift */; }; + DEC81AEE2A55ADEC008FE935 /* InterstitialAdViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DEC81AED2A55ADEC008FE935 /* InterstitialAdViewController.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -122,6 +132,16 @@ 9722EABB876EC1FBC865DDBE /* Pods-YandexMobileAdsExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YandexMobileAdsExample.release.xcconfig"; path = "Target Support Files/Pods-YandexMobileAdsExample/Pods-YandexMobileAdsExample.release.xcconfig"; sourceTree = ""; }; A35F1D3A95F5CC1C05B0ED57 /* libPods-YandexMobileAdsExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-YandexMobileAdsExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; B394AC8527A868DB00D92CD9 /* AdPlayerErrorConverter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdPlayerErrorConverter.swift; sourceTree = ""; }; + DEC81AD92A53A89B008FE935 /* YandexAdsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YandexAdsViewController.swift; sourceTree = ""; }; + DEC81ADB2A53B9E7008FE935 /* String+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Extensions.swift"; sourceTree = ""; }; + DEC81ADD2A53BE28008FE935 /* InstreamListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstreamListViewController.swift; sourceTree = ""; }; + DEC81ADF2A53C28D008FE935 /* NavigationTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationTableViewController.swift; sourceTree = ""; }; + DEC81AE12A53C840008FE935 /* NativeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NativeViewController.swift; sourceTree = ""; }; + DEC81AE32A53C945008FE935 /* NavigationScreenDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationScreenDataSource.swift; sourceTree = ""; }; + DEC81AE52A54D5A3008FE935 /* StickyBannerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StickyBannerViewController.swift; sourceTree = ""; }; + DEC81AE72A54D8DE008FE935 /* InlineBannerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InlineBannerViewController.swift; sourceTree = ""; }; + DEC81AEB2A55A2F6008FE935 /* RewardedAdViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RewardedAdViewController.swift; sourceTree = ""; }; + DEC81AED2A55ADEC008FE935 /* InterstitialAdViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InterstitialAdViewController.swift; sourceTree = ""; }; EA2B7BC1DE6EF14C5B13E9F5 /* Pods-YandexMobileAdsExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-YandexMobileAdsExample.debug.xcconfig"; path = "Target Support Files/Pods-YandexMobileAdsExample/Pods-YandexMobileAdsExample.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -141,6 +161,9 @@ isa = PBXGroup; children = ( 14033F6127201D9E00A24D5E /* Native */, + DEC81ADB2A53B9E7008FE935 /* String+Extensions.swift */, + DEC81ADF2A53C28D008FE935 /* NavigationTableViewController.swift */, + DEC81AE32A53C945008FE935 /* NavigationScreenDataSource.swift */, ); path = Common; sourceTree = ""; @@ -328,6 +351,7 @@ 147B0BC7271FFC04005F4062 /* Interstitial */, 147B0BCA27200CF3005F4062 /* Native */, 147B0BD627200F66005F4062 /* Rewarded */, + DEC81AD92A53A89B008FE935 /* YandexAdsViewController.swift */, ); path = Yandex; sourceTree = ""; @@ -336,6 +360,7 @@ isa = PBXGroup; children = ( 147B0BC8271FFC53005F4062 /* InterstitialViewController.swift */, + DEC81AED2A55ADEC008FE935 /* InterstitialAdViewController.swift */, ); path = Interstitial; sourceTree = ""; @@ -344,6 +369,7 @@ isa = PBXGroup; children = ( 147B0BCE27200D14005F4062 /* CustomNativeViewController.swift */, + DEC81AE12A53C840008FE935 /* NativeViewController.swift */, 14033FC32720598D00A24D5E /* TemplateNativeViewController.swift */, ); path = Native; @@ -353,6 +379,8 @@ isa = PBXGroup; children = ( 147B0BD427200E75005F4062 /* BannerViewController.swift */, + DEC81AE52A54D5A3008FE935 /* StickyBannerViewController.swift */, + DEC81AE72A54D8DE008FE935 /* InlineBannerViewController.swift */, ); path = Banner; sourceTree = ""; @@ -361,6 +389,7 @@ isa = PBXGroup; children = ( 147B0BD727200FCE005F4062 /* RewardedViewController.swift */, + DEC81AEB2A55A2F6008FE935 /* RewardedAdViewController.swift */, ); path = Rewarded; sourceTree = ""; @@ -374,6 +403,7 @@ 14033F922720457800A24D5E /* Player */, 14033FA42720457800A24D5E /* Toast */, 14033FA12720457800A24D5E /* Visibility */, + DEC81ADD2A53BE28008FE935 /* InstreamListViewController.swift */, ); path = Instream; sourceTree = ""; @@ -548,10 +578,12 @@ 1474FC1E2721A4E500276688 /* GDPRUserConsentManager.swift in Sources */, 14033FB32720457800A24D5E /* LRUCache.swift in Sources */, 14033FB22720457800A24D5E /* AdPlayer.swift in Sources */, + DEC81AE82A54D8DE008FE935 /* InlineBannerViewController.swift in Sources */, 14033FC22720457800A24D5E /* InstreamInrollViewController.swift in Sources */, 147B0BDD27201213005F4062 /* MobileMediationBannerViewController.swift in Sources */, 14033FC12720457800A24D5E /* InrollsPlaybackController.swift in Sources */, 14033FC42720598D00A24D5E /* TemplateNativeViewController.swift in Sources */, + DEC81AE42A53C945008FE935 /* NavigationScreenDataSource.swift in Sources */, 147B0BC9271FFC53005F4062 /* InterstitialViewController.swift in Sources */, 46C354A0282560FE00832C7C /* IronSourceRewardedViewController.swift in Sources */, 14033FB72720457800A24D5E /* VideoAVPlayer.swift in Sources */, @@ -559,26 +591,34 @@ 147B0BD127200D14005F4062 /* NativeAdView.swift in Sources */, 14033F5E27201B8A00A24D5E /* MobileMediationInterstitialViewController.swift in Sources */, 14033FB52720457800A24D5E /* ReusablePlayer.swift in Sources */, + DEC81ADA2A53A89B008FE935 /* YandexAdsViewController.swift in Sources */, 147B0BD827200FCE005F4062 /* RewardedViewController.swift in Sources */, + DEC81AEE2A55ADEC008FE935 /* InterstitialAdViewController.swift in Sources */, 14033F6527201E2700A24D5E /* MobileMediationNativeViewController.swift in Sources */, 1499318B2722CD44005D2E87 /* AdFoxInterstitialViewController.swift in Sources */, 14033FB12720457800A24D5E /* ContentControlsController.swift in Sources */, 14033FBD2720457800A24D5E /* ViewVisibilityValidator.swift in Sources */, + DEC81AE62A54D5A3008FE935 /* StickyBannerViewController.swift in Sources */, 14033FB02720457800A24D5E /* InstreamContent.swift in Sources */, + DEC81AE02A53C28D008FE935 /* NavigationTableViewController.swift in Sources */, 14033F8027202AC300A24D5E /* AdMobNativeViewController.swift in Sources */, 14033FB62720457800A24D5E /* VideoPlayerProvider.swift in Sources */, + DEC81ADE2A53BE28008FE935 /* InstreamListViewController.swift in Sources */, 1474FC222721A4E500276688 /* SettingsViewController.swift in Sources */, + DEC81AE22A53C840008FE935 /* NativeViewController.swift in Sources */, 46C354A2282560FE00832C7C /* IronSourceManager.swift in Sources */, 14033FBA2720457800A24D5E /* PlayerView.swift in Sources */, 149931882722C423005D2E87 /* AdFoxBannerViewController.swift in Sources */, 14033FBC2720457800A24D5E /* VideoPlayerVisibilityTracker.swift in Sources */, 1474FC232721A4E500276688 /* GDPRViewController.swift in Sources */, 1467E353271EA91500DF104A /* AppDelegate.swift in Sources */, + DEC81AEC2A55A2F6008FE935 /* RewardedAdViewController.swift in Sources */, 14033F6827201F7900A24D5E /* MobileMediationRewardedViewController.swift in Sources */, B394AC8627A868DB00D92CD9 /* AdPlayerErrorConverter.swift in Sources */, 14033FB92720457800A24D5E /* ContentPlayerControlsDelegate.swift in Sources */, 14033FC02720457800A24D5E /* InstreamAdBreakPositionFormatter.swift in Sources */, 14033FBF2720457800A24D5E /* InstreamParametersParser.swift in Sources */, + DEC81ADC2A53B9E7008FE935 /* String+Extensions.swift in Sources */, 14033F8527202B8D00A24D5E /* AdMobNativeAdView.swift in Sources */, 14033FBB2720457800A24D5E /* VideoAVPlayerDelegate.swift in Sources */, 149931842722BD94005D2E87 /* AdFoxNativeViewController.swift in Sources */, @@ -741,7 +781,7 @@ CURRENT_PROJECT_VERSION = 531; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = YandexMobileAdsExample/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -750,9 +790,12 @@ OTHER_LDFLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = ru.yandex.mobile.YandexMobileAdsExample; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_OBJC_BRIDGING_HEADER = "YandexMobileAdsExample/YandexMobileAdsExample-Bridging-Header.h"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 1; }; name = Debug; }; @@ -766,7 +809,7 @@ CURRENT_PROJECT_VERSION = 531; DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = YandexMobileAdsExample/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 12.0; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -775,9 +818,12 @@ OTHER_LDFLAGS = "$(inherited)"; PRODUCT_BUNDLE_IDENTIFIER = ru.yandex.mobile.YandexMobileAdsExample; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_OBJC_BRIDGING_HEADER = "YandexMobileAdsExample/YandexMobileAdsExample-Bridging-Header.h"; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = 1; }; name = Release; }; diff --git a/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Adfox/AdFoxBannerViewController.swift b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Adfox/AdFoxBannerViewController.swift index bc03f82..cc90bec 100644 --- a/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Adfox/AdFoxBannerViewController.swift +++ b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Adfox/AdFoxBannerViewController.swift @@ -13,7 +13,7 @@ class AdFoxBannerViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - let adSize = YMAAdSize.flexibleSize(with: .init(width: 320, height: 100)) + let adSize = YMAAdSize.inlineSize(withWidth: 320, maxHeight: 100) // Replace demo R-M-243655-8 with actual Ad Unit ID self.adView = YMAAdView(adUnitID: "R-M-243655-8", adSize: adSize) self.adView.delegate = self diff --git a/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Common/NavigationScreenDataSource.swift b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Common/NavigationScreenDataSource.swift new file mode 100644 index 0000000..89674d6 --- /dev/null +++ b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Common/NavigationScreenDataSource.swift @@ -0,0 +1,6 @@ +import Foundation + +protocol NavigationScreenDataSource { + var destinationViewController: UIViewController { get } + var title: String { get } +} diff --git a/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Common/NavigationTableViewController.swift b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Common/NavigationTableViewController.swift new file mode 100644 index 0000000..c3a4785 --- /dev/null +++ b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Common/NavigationTableViewController.swift @@ -0,0 +1,21 @@ +import Foundation + +class NavigationTableViewController: UITableViewController where T: CaseIterable { + private var dataSource = Array(T.allCases) + + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + dataSource.count + } + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + let cell = UITableViewCell() + let cellModel = dataSource[indexPath.row] + cell.textLabel?.text = cellModel.title + return cell + } + + override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + let cellModel = dataSource[indexPath.row] + navigationController?.pushViewController(cellModel.destinationViewController, animated: true) + } +} diff --git a/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Common/String+Extensions.swift b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Common/String+Extensions.swift new file mode 100644 index 0000000..2b25ac9 --- /dev/null +++ b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Common/String+Extensions.swift @@ -0,0 +1,10 @@ +import Foundation + +extension String { + func camelCaseToWords() -> String { + map { ($0.isUppercase ? " " : "") + String($0) } + .joined(separator: "") + .trimmingCharacters(in: .whitespaces) + .localizedCapitalized + } +} diff --git a/Examples/YandexMobileAdsExample/YandexMobileAdsExample/MobileMediation/MobileMediationBannerViewController.swift b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/MobileMediation/MobileMediationBannerViewController.swift index 1320cfb..31ca2da 100644 --- a/Examples/YandexMobileAdsExample/YandexMobileAdsExample/MobileMediation/MobileMediationBannerViewController.swift +++ b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/MobileMediation/MobileMediationBannerViewController.swift @@ -31,7 +31,7 @@ class MobileMediationBannerViewController: UIViewController { private var adView: YMAAdView? @IBAction func loadAd(_ sender: UIButton) { - let adSize = YMAAdSize.flexibleSize(with: .init(width: 320, height: 50)) + let adSize = YMAAdSize.inlineSize(withWidth: 320, maxHeight: 50) let selectedBlockIndex = pickerView.selectedRow(inComponent: 0) /* Replace adUnitID with actual Ad unitt ID. diff --git a/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Third-PartyMediation/IronSource/IronSourceInterstitialViewController.swift b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Third-PartyMediation/IronSource/IronSourceInterstitialViewController.swift index 2a0ba7e..ad1c100 100644 --- a/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Third-PartyMediation/IronSource/IronSourceInterstitialViewController.swift +++ b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Third-PartyMediation/IronSource/IronSourceInterstitialViewController.swift @@ -18,7 +18,7 @@ class IronSourceInterstitialViewController: UIViewController { func initializeIronSource() { IronSourceManager.shared.initializeSDK() - IronSource.setInterstitialDelegate(self) + IronSource.setLevelPlayInterstitialDelegate(self) } @IBAction func loadAd(_ sender: UIButton) { @@ -31,34 +31,36 @@ class IronSourceInterstitialViewController: UIViewController { } } -extension IronSourceInterstitialViewController: ISInterstitialDelegate { - func interstitialDidFailToLoadWithError(_ error: Error!) { - print("Interstitial did fail to load") - showButton.isEnabled = false - } +// MARK: - LevelPlayInterstitialDelegate - func interstitialDidLoad() { +extension IronSourceInterstitialViewController: LevelPlayInterstitialDelegate { + func didLoad(with adInfo: ISAdInfo!) { print("Interstitial did load") showButton.isEnabled = true } - func interstitialDidFailToShowWithError(_ error: Error!) { - print("Interstitial did fail to show") + func didFailToLoadWithError(_ error: Error!) { + print("Interstitial did fail to load") + showButton.isEnabled = false } - func interstitialDidShow() { + func didOpen(with adInfo: ISAdInfo!) { + print("Interstitial did open") + } + + func didShow(with adInfo: ISAdInfo!) { print("Interstitial did show") } - func didClickInterstitial() { - print("Did click interstitial") + func didFailToShowWithError(_ error: Error!, andAdInfo adInfo: ISAdInfo!) { + print("Interstitial did fail to show") } - func interstitialDidOpen() { - print("Interstitial did open") + func didClick(with adInfo: ISAdInfo!) { + print("Did click interstitial") } - func interstitialDidClose() { + func didClose(with adInfo: ISAdInfo!) { print("Interstital did close") } } diff --git a/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Third-PartyMediation/IronSource/IronSourceManager.swift b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Third-PartyMediation/IronSource/IronSourceManager.swift index 0f3a206..ac7364b 100644 --- a/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Third-PartyMediation/IronSource/IronSourceManager.swift +++ b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Third-PartyMediation/IronSource/IronSourceManager.swift @@ -1,5 +1,5 @@ /* - * Version for iOS © 2015–2022 YANDEX + * Version for iOS © 2015–2023 YANDEX * * You may not use this file except in compliance with the License. * You may obtain a copy of the License at https://yandex.com/legal/mobileads_sdk_agreement/ @@ -10,64 +10,12 @@ import UIKit class IronSourceManager: NSObject { static let shared = IronSourceManager() - //Mediator is used because IronSource.setRewardedVideoManualDelegate(...) creates a strong link - //and handles it during the application lifecycle - private weak var delegate: ISRewardedVideoManualDelegate? - private override init() { super.init() } - func set(rewardedVideoManualDelegate: ISRewardedVideoManualDelegate?) { - delegate = rewardedVideoManualDelegate - } - func initializeSDK() { - IronSource.setRewardedVideoManualDelegate(self) // Replace 199eacc45 with app key generated at https://www.is.com/ IronSource.initWithAppKey("199eacc45", adUnits: [IS_INTERSTITIAL, IS_REWARDED_VIDEO]) } } - -extension IronSourceManager: ISRewardedVideoManualDelegate { - func rewardedVideoDidLoad() { - delegate?.rewardedVideoDidLoad() - } - - func rewardedVideoDidFailToLoadWithError(_ error: Error!) { - delegate?.rewardedVideoDidFailToLoadWithError(error) - } - - // MARK: - ISRewardedVideoDelegate - func rewardedVideoHasChangedAvailability(_ available: Bool) { - delegate?.rewardedVideoHasChangedAvailability(available) - } - - func didReceiveReward(forPlacement placementInfo: ISPlacementInfo!) { - delegate?.didReceiveReward(forPlacement: placementInfo) - } - - func rewardedVideoDidFailToShowWithError(_ error: Error!) { - delegate?.rewardedVideoDidFailToShowWithError(error) - } - - func rewardedVideoDidOpen() { - delegate?.rewardedVideoDidOpen() - } - - func rewardedVideoDidClose() { - delegate?.rewardedVideoDidClose() - } - - func didClickRewardedVideo(_ placementInfo: ISPlacementInfo!) { - delegate?.didClickRewardedVideo(placementInfo) - } - - func rewardedVideoDidStart() { - delegate?.rewardedVideoDidStart() - } - - func rewardedVideoDidEnd() { - delegate?.rewardedVideoDidEnd() - } -} diff --git a/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Third-PartyMediation/IronSource/IronSourceRewardedViewController.swift b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Third-PartyMediation/IronSource/IronSourceRewardedViewController.swift index ab72968..d483d21 100644 --- a/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Third-PartyMediation/IronSource/IronSourceRewardedViewController.swift +++ b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Third-PartyMediation/IronSource/IronSourceRewardedViewController.swift @@ -13,7 +13,7 @@ class IronSourceRewardedViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - IronSourceManager.shared.set(rewardedVideoManualDelegate: self) + IronSource.setLevelPlayRewardedVideoManualDelegate(self) IronSourceManager.shared.initializeSDK() } @@ -27,24 +27,28 @@ class IronSourceRewardedViewController: UIViewController { } } -extension IronSourceRewardedViewController: ISRewardedVideoManualDelegate { - func rewardedVideoDidLoad() { +extension IronSourceRewardedViewController: LevelPlayRewardedVideoManualDelegate { + func didLoad(with adInfo: ISAdInfo!) { print("Rewarded did load") showButton.isEnabled = true } - func rewardedVideoDidFailToLoadWithError(_ error: Error!) { + func didFailToLoadWithError(_ error: Error!) { print("Rewarded did fail to load") showButton.isEnabled = false } - // MARK: - ISRewardedVideoDelegate - func rewardedVideoHasChangedAvailability(_ available: Bool) { - print(String(format: "Rewarded ad changed availability: %@", String(available))) - showButton.isEnabled = available + func hasAvailableAd(with adInfo: ISAdInfo!) { + print("Rewarded ad is available") + showButton.isEnabled = true + } + + func hasNoAvailableAd() { + print("Rewarded ad isn't available") + showButton.isEnabled = false } - func didReceiveReward(forPlacement placementInfo: ISPlacementInfo!) { + func didReceiveReward(forPlacement placementInfo: ISPlacementInfo!, with adInfo: ISAdInfo!) { let message = String( format: "Did reward: %@ %@ %@", placementInfo.placementName, @@ -54,19 +58,19 @@ extension IronSourceRewardedViewController: ISRewardedVideoManualDelegate { print(message) } - func rewardedVideoDidFailToShowWithError(_ error: Error!) { + func didFailToShowWithError(_ error: Error!, andAdInfo adInfo: ISAdInfo!) { print("Rewarded ad failed to load: \(error.localizedDescription)") } - func rewardedVideoDidOpen() { + func didOpen(with adInfo: ISAdInfo!) { print("Did open rewarded video") } - func rewardedVideoDidClose() { + func didClose(with adInfo: ISAdInfo!) { print("Did close rewarded video") } - func didClickRewardedVideo(_ placementInfo: ISPlacementInfo!) { + func didClick(_ placementInfo: ISPlacementInfo!, with adInfo: ISAdInfo!) { let message = String( format: "Did click rewarded video: %@ %@ %@", placementInfo.placementName, diff --git a/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Banner/BannerViewController.swift b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Banner/BannerViewController.swift index 3f7dd54..0248695 100644 --- a/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Banner/BannerViewController.swift +++ b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Banner/BannerViewController.swift @@ -15,7 +15,7 @@ class BannerViewController: UIViewController { super.viewDidLoad() // Replace demo demo-banner-yandex with actual Ad Unit ID - let adSize = YMAAdSize.flexibleSize(with: .init(width: 320, height: 50)) + let adSize = YMAAdSize.inlineSize(withWidth: 320, maxHeight: 50) self.adView = YMAAdView(adUnitID: "demo-banner-yandex", adSize: adSize) self.adView.delegate = self } diff --git a/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Banner/InlineBannerViewController.swift b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Banner/InlineBannerViewController.swift new file mode 100644 index 0000000..a6b2e27 --- /dev/null +++ b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Banner/InlineBannerViewController.swift @@ -0,0 +1,99 @@ +/* + * Version for iOS © 2015–2023 YANDEX + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at https://yandex.com/legal/mobileads_sdk_agreement/ + */ + +import YandexMobileAds + +final class InlineBannerViewController: UIViewController { + private var adView: YMAAdView? + private var loadButton: UIButton? + + override func viewDidLayoutSubviews() { + setupUI() + } + + override func viewDidAppear(_ animated: Bool) { + createAdView() + setupAdView() + } + + // MARK: - Ad + + private func createAdView() { + let adSize = YMAAdSize.inlineSize(withWidth: 320, maxHeight: 320) + // Replace demo demo-banner-yandex with actual Ad Unit ID + adView = YMAAdView(adUnitID: "demo-banner-yandex", adSize: adSize) + adView?.delegate = self + } + + private func setupAdView() { + guard let adView, let loadButton else { return } + adView.translatesAutoresizingMaskIntoConstraints = false + view.addSubview(adView) + + NSLayoutConstraint.activate([ + adView.topAnchor.constraint(equalTo: loadButton.layoutMarginsGuide.bottomAnchor, constant: 100), + adView.centerXAnchor.constraint(equalTo: view.layoutMarginsGuide.centerXAnchor), + ]) + } + + // MARK: - UI + + private func setupUI() { + view.backgroundColor = .white + title = "Inline Banner" + + setupLoadButton() + } + + private func setupLoadButton() { + let button = UIButton( + configuration: .tinted(), + primaryAction: UIAction(title: "Load ad") { [weak self] _ in + self?.adView?.loadAd() + } + ) + button.translatesAutoresizingMaskIntoConstraints = false + button.setTitle("Load ad", for: .normal) + view.addSubview(button) + + NSLayoutConstraint.activate([ + button.topAnchor.constraint(equalTo: view.layoutMarginsGuide.topAnchor, constant: 100), + button.centerXAnchor.constraint(equalTo: view.layoutMarginsGuide.centerXAnchor), + ]) + loadButton = button + } +} + +extension InlineBannerViewController: YMAAdViewDelegate { + func adViewDidLoad(_ adView: YMAAdView) { + print(#function) + } + + func adViewDidClick(_ adView: YMAAdView) { + print(#function) + } + + func adView(_ adView: YMAAdView, didTrackImpressionWith impressionData: YMAImpressionData?) { + print(#function) + } + + func adViewDidFailLoading(_ adView: YMAAdView, error: Error) { + print(#function + "Error: \(error)") + } + + func adViewWillLeaveApplication(_ adView: YMAAdView) { + print(#function) + } + + func adView(_ adView: YMAAdView, willPresentScreen viewController: UIViewController?) { + print(#function) + } + + func adView(_ adView: YMAAdView, didDismissScreen viewController: UIViewController?) { + print(#function) + } +} diff --git a/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Banner/StickyBannerViewController.swift b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Banner/StickyBannerViewController.swift new file mode 100644 index 0000000..a6228a4 --- /dev/null +++ b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Banner/StickyBannerViewController.swift @@ -0,0 +1,88 @@ +/* + * Version for iOS © 2015–2023 YANDEX + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at https://yandex.com/legal/mobileads_sdk_agreement/ + */ + +import YandexMobileAds + +final class StickyBannerViewController: UIViewController { + private var adView: YMAAdView? + + override func viewDidLayoutSubviews() { + setupUI() + } + + override func viewDidAppear(_ animated: Bool) { + createAdView() + } + + // MARK: - Ad + + private func createAdView() { + let width = view.safeAreaLayoutGuide.layoutFrame.width + let adSize = YMAAdSize.stickySize(withContainerWidth: width) + // Replace demo demo-banner-yandex with actual Ad Unit ID + adView = YMAAdView(adUnitID: "demo-banner-yandex", adSize: adSize) + adView?.delegate = self + adView?.displayAtBottom(in: view) + } + + // MARK: - UI + + private func setupUI() { + view.backgroundColor = .white + title = "Sticky Banner" + + setupLoadButton() + } + + private func setupLoadButton() { + let button = UIButton( + configuration: .tinted(), + primaryAction: UIAction(title: "Load ad") { [weak self] _ in + self?.adView?.loadAd() + } + ) + button.translatesAutoresizingMaskIntoConstraints = false + button.setTitle("Load ad", for: .normal) + view.addSubview(button) + + NSLayoutConstraint.activate([ + button.topAnchor.constraint(equalTo: view.layoutMarginsGuide.topAnchor, constant: 100), + button.centerXAnchor.constraint(equalTo: view.layoutMarginsGuide.centerXAnchor), + ]) + } + +} + +extension StickyBannerViewController: YMAAdViewDelegate { + func adViewDidLoad(_ adView: YMAAdView) { + print(#function) + } + + func adViewDidClick(_ adView: YMAAdView) { + print(#function) + } + + func adView(_ adView: YMAAdView, didTrackImpressionWith impressionData: YMAImpressionData?) { + print(#function) + } + + func adViewDidFailLoading(_ adView: YMAAdView, error: Error) { + print(#function + "Error: \(error)") + } + + func adViewWillLeaveApplication(_ adView: YMAAdView) { + print(#function) + } + + func adView(_ adView: YMAAdView, willPresentScreen viewController: UIViewController?) { + print(#function) + } + + func adView(_ adView: YMAAdView, didDismissScreen viewController: UIViewController?) { + print(#function) + } +} diff --git a/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Instream/InstreamListViewController.swift b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Instream/InstreamListViewController.swift new file mode 100644 index 0000000..56fa29d --- /dev/null +++ b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Instream/InstreamListViewController.swift @@ -0,0 +1,28 @@ +/* + * Version for iOS © 2015–2023 YANDEX + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at https://yandex.com/legal/mobileads_sdk_agreement/ + */ + +import Foundation + +enum InstreamListCellModel: NavigationScreenDataSource, CaseIterable { + case singleInstream + case inroll + + var destinationViewController: UIViewController { + switch self { + case .singleInstream: + return InstreamViewController() + case .inroll: + return InstreamInrollViewController() + } + } + + var title: String { + String(describing: self).camelCaseToWords() + } +} + +final class InstreamListViewController: NavigationTableViewController { } diff --git a/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Interstitial/InterstitialAdViewController.swift b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Interstitial/InterstitialAdViewController.swift new file mode 100644 index 0000000..297cb9b --- /dev/null +++ b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Interstitial/InterstitialAdViewController.swift @@ -0,0 +1,123 @@ +/* + * Version for iOS © 2015–2023 YANDEX + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at https://yandex.com/legal/mobileads_sdk_agreement/ + */ + +import YandexMobileAds + +final class InterstitialAdViewController: UIViewController { + private var interstitialAd: YMAInterstitialAd? + private var presentButton: UIButton? + + override func viewDidLayoutSubviews() { + setupUI() + } + + override func viewDidAppear(_ animated: Bool) { + createRewardedAd() + } + + // MARK: - Ad + + private func createRewardedAd() { + // Replace demo-interstitial-yandex with actual Ad Unit ID + interstitialAd = YMAInterstitialAd(adUnitID: "demo-interstitial-yandex") + interstitialAd?.delegate = self + } + + // MARK: - UI + + private func setupUI() { + view.backgroundColor = .white + title = "Interstitial Ad" + + setupLoadButton() + setupPresentButton() + } + + private func setupLoadButton() { + let button = UIButton( + configuration: .tinted(), + primaryAction: UIAction(title: "Load ad") { [weak self] _ in + self?.interstitialAd?.load() + } + ) + button.translatesAutoresizingMaskIntoConstraints = false + button.setTitle("Load ad", for: .normal) + view.addSubview(button) + + NSLayoutConstraint.activate([ + button.topAnchor.constraint(equalTo: view.layoutMarginsGuide.topAnchor, constant: 100), + button.trailingAnchor.constraint(equalTo: view.layoutMarginsGuide.centerXAnchor, constant: -20) + ]) + } + + private func setupPresentButton() { + let button = UIButton( + configuration: .tinted(), + primaryAction: UIAction(title: "Present ad") { [weak self] _ in + guard let self else { return } + self.interstitialAd?.present(from: self) + } + ) + button.translatesAutoresizingMaskIntoConstraints = false + button.setTitle("Present ad", for: .normal) + button.isEnabled = false + view.addSubview(button) + + NSLayoutConstraint.activate([ + button.topAnchor.constraint(equalTo: view.layoutMarginsGuide.topAnchor, constant: 100), + button.leadingAnchor.constraint(equalTo: view.layoutMarginsGuide.centerXAnchor, constant: 20) + ]) + presentButton = button + } +} + +extension InterstitialAdViewController: YMAInterstitialAdDelegate { + func interstitialAdDidLoad(_ interstitialAd: YMAInterstitialAd) { + print(#function) + presentButton?.isEnabled = true + } + + func interstitialAdDidFail(toLoad interstitialAd: YMAInterstitialAd, error: Error) { + print(#function + "Error: \(error)") + } + + func interstitialAdDidClick(_ interstitialAd: YMAInterstitialAd) { + print(#function) + } + + func interstitialAd(_ interstitialAd: YMAInterstitialAd, didTrackImpressionWith impressionData: YMAImpressionData?) { + print(#function) + } + + func interstitialAdWillLeaveApplication(_ interstitialAd: YMAInterstitialAd) { + print(#function) + } + + func interstitialAdDidFail(toPresent interstitialAd: YMAInterstitialAd, error: Error) { + print(#function + "Error: \(error)") + } + + func interstitialAdWillAppear(_ interstitialAd: YMAInterstitialAd) { + print(#function) + } + + func interstitialAdDidAppear(_ interstitialAd: YMAInterstitialAd) { + print(#function) + } + + func interstitialAdWillDisappear(_ interstitialAd: YMAInterstitialAd) { + print(#function) + } + + func interstitialAdDidDisappear(_ interstitialAd: YMAInterstitialAd) { + print(#function) + } + + func interstitialAd(_ interstitialAd: YMAInterstitialAd, willPresentScreen webBrowser: UIViewController?) { + print(#function) + } +} diff --git a/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Native/NativeViewController.swift b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Native/NativeViewController.swift new file mode 100644 index 0000000..9abe07e --- /dev/null +++ b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Native/NativeViewController.swift @@ -0,0 +1,28 @@ +/* + * Version for iOS © 2015–2023 YANDEX + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at https://yandex.com/legal/mobileads_sdk_agreement/ + */ + +import Foundation + +enum NativeCellModel: NavigationScreenDataSource, CaseIterable { + case template + case custom + + var destinationViewController: UIViewController { + switch self { + case .template: + return TemplateNativeViewController() + case .custom: + return CustomNativeViewController() + } + } + + var title: String { + String(describing: self).camelCaseToWords() + } +} + +final class NativeViewController: NavigationTableViewController { } diff --git a/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Rewarded/RewardedAdViewController.swift b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Rewarded/RewardedAdViewController.swift new file mode 100644 index 0000000..68cf2ac --- /dev/null +++ b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/Rewarded/RewardedAdViewController.swift @@ -0,0 +1,137 @@ +/* + * Version for iOS © 2015–2023 YANDEX + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at https://yandex.com/legal/mobileads_sdk_agreement/ + */ + +import YandexMobileAds + +final class RewardedAdViewController: UIViewController { + private var rewardedAd: YMARewardedAd? + private var presentButton: UIButton? + + override func viewDidLayoutSubviews() { + setupUI() + } + + override func viewDidAppear(_ animated: Bool) { + createRewardedAd() + } + + // MARK: - Ad + + private func createRewardedAd() { + // Replace demo-rewarded-yandex with actual Ad Unit ID + rewardedAd = YMARewardedAd(adUnitID: "demo-rewarded-yandex") + rewardedAd?.delegate = self + } + + private func giveReward(_ reward: YMAReward) { + let alertController = UIAlertController( + title: "Reward", + message: "Rewarded ad did reward: \(reward.amount) \(reward.type)", + preferredStyle: .alert) + alertController.addAction(.init(title: "Ok", style: .default)) + presentedViewController?.present(alertController, animated: true, completion: nil) + } + + // MARK: - UI + + private func setupUI() { + view.backgroundColor = .white + title = "Rewarded Ad" + + setupLoadButton() + setupPresentButton() + } + + private func setupLoadButton() { + let button = UIButton( + configuration: .tinted(), + primaryAction: UIAction(title: "Load ad") { [weak self] _ in + self?.rewardedAd?.load() + } + ) + button.translatesAutoresizingMaskIntoConstraints = false + button.setTitle("Load ad", for: .normal) + view.addSubview(button) + + NSLayoutConstraint.activate([ + button.topAnchor.constraint(equalTo: view.layoutMarginsGuide.topAnchor, constant: 100), + button.trailingAnchor.constraint(equalTo: view.layoutMarginsGuide.centerXAnchor, constant: -20) + ]) + } + + private func setupPresentButton() { + let button = UIButton( + configuration: .tinted(), + primaryAction: UIAction(title: "Present ad") { [weak self] _ in + guard let self else { return } + self.rewardedAd?.present(from: self) + } + ) + button.translatesAutoresizingMaskIntoConstraints = false + button.setTitle("Present ad", for: .normal) + button.isEnabled = false + view.addSubview(button) + + NSLayoutConstraint.activate([ + button.topAnchor.constraint(equalTo: view.layoutMarginsGuide.topAnchor, constant: 100), + button.leadingAnchor.constraint(equalTo: view.layoutMarginsGuide.centerXAnchor, constant: 20) + ]) + presentButton = button + } +} + +extension RewardedAdViewController: YMARewardedAdDelegate { + func rewardedAd(_ rewardedAd: YMARewardedAd, didReward reward: YMAReward) { + print(#function) + giveReward(reward) + } + + func rewardedAdDidLoad(_ rewardedAd: YMARewardedAd) { + print(#function) + presentButton?.isEnabled = true + } + + func rewardedAdDidFail(toLoad rewardedAd: YMARewardedAd, error: Error) { + print(#function + "Error: \(error)") + } + + func rewardedAdDidClick(_ rewardedAd: YMARewardedAd) { + print(#function) + } + + func rewardedAd(_ rewardedAd: YMARewardedAd, didTrackImpressionWith impressionData: YMAImpressionData?) { + print(#function) + } + + func rewardedAdWillLeaveApplication(_ rewardedAd: YMARewardedAd) { + print(#function) + } + + func rewardedAdDidFail(toPresent rewardedAd: YMARewardedAd, error: Error) { + print(#function + "Error: \(error)") + } + + func rewardedAdWillAppear(_ rewardedAd: YMARewardedAd) { + print(#function) + } + + func rewardedAdDidAppear(_ rewardedAd: YMARewardedAd) { + print(#function) + } + + func rewardedAdWillDisappear(_ rewardedAd: YMARewardedAd) { + print(#function) + } + + func rewardedAdDidDisappear(_ rewardedAd: YMARewardedAd) { + print(#function) + } + + func rewardedAd(_ rewardedAd: YMARewardedAd, willPresentScreen viewController: UIViewController?) { + print(#function) + } +} diff --git a/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/YandexAdsViewController.swift b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/YandexAdsViewController.swift new file mode 100644 index 0000000..9ade99e --- /dev/null +++ b/Examples/YandexMobileAdsExample/YandexMobileAdsExample/Yandex/YandexAdsViewController.swift @@ -0,0 +1,40 @@ +/* + * Version for iOS © 2015–2023 YANDEX + * + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at https://yandex.com/legal/mobileads_sdk_agreement/ + */ + +import Foundation + +enum YandexAdsCellModel: NavigationScreenDataSource, CaseIterable { + case stickyBanner + case inlineBanner + case interstitial + case rewarded + case native + case instream + + var destinationViewController: UIViewController { + switch self { + case .stickyBanner: + return StickyBannerViewController() + case .inlineBanner: + return InlineBannerViewController() + case .interstitial: + return InterstitialAdViewController() + case .rewarded: + return RewardedAdViewController() + case .native: + return UIViewController() + case .instream: + return InstreamListViewController() + } + } + + var title: String { + String(describing: self).camelCaseToWords() + } +} + +final class YandexAdsViewController: NavigationTableViewController { } diff --git a/changelog/adapter/admob-mobileads/CHANGELOG.md b/changelog/adapter/admob-mobileads/CHANGELOG.md index 148cd88..e2bcc66 100644 --- a/changelog/adapter/admob-mobileads/CHANGELOG.md +++ b/changelog/adapter/admob-mobileads/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log All notable changes to this project will be documented in this file. +## Version 5.9.0.0 + +### Updated +* Added support for Yandex Mobile Ads SDK 5.9.0 +* Added support for Google Mobile Ads SDK version 10.7.0 +* Updated minimum supported Google Mobile Ads SDK version to 10.7.0 + ## Version 5.8.0.0 #### Updated diff --git a/changelog/adapter/ironsource-mobileads/CHANGELOG.md b/changelog/adapter/ironsource-mobileads/CHANGELOG.md index 99f8445..53f8db6 100644 --- a/changelog/adapter/ironsource-mobileads/CHANGELOG.md +++ b/changelog/adapter/ironsource-mobileads/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log All notable changes to this project will be documented in this file. +## Version 5.9.0.0 + +### Updated +* Added support for Yandex Mobile Ads SDK 5.9.0 + ## Version 5.8.0.0 ### Updated @@ -9,7 +14,7 @@ All notable changes to this project will be documented in this file. ## Version 5.7.0.0 ### Updated -* Added support for Yandex Mobile Ads SDK 5.6.0 +* Added support for Yandex Mobile Ads SDK 5.7.0 ## Version 5.6.0.0 diff --git a/changelog/mediation/mobileads-adcolony/CHANGELOG.md b/changelog/mediation/mobileads-adcolony/CHANGELOG.md index eb357ec..3409523 100644 --- a/changelog/mediation/mobileads-adcolony/CHANGELOG.md +++ b/changelog/mediation/mobileads-adcolony/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log All notable changes to this project will be documented in this file. +## Version 4.9.0.4 + +#### Added +* Updated minimum supported Yandex Mobile Ads SDK version to 5.9.0 + ## Version 4.9.0.3 #### Added diff --git a/changelog/mediation/mobileads-admob/CHANGELOG.md b/changelog/mediation/mobileads-admob/CHANGELOG.md index 24994e1..af4e69d 100644 --- a/changelog/mediation/mobileads-admob/CHANGELOG.md +++ b/changelog/mediation/mobileads-admob/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log All notable changes to this project will be documented in this file. +## Version 10.7.0.0 + +#### Added +* Added support for AdMob SDK version 10.7.0 +* Updated minimum supported AdMob SDK version to 10.7.0 +* Updated minimum supported Yandex Mobile Ads SDK version to 5.9.0 + ## Version 10.6.0.0 #### Added diff --git a/changelog/mediation/mobileads-applovin/CHANGELOG.md b/changelog/mediation/mobileads-applovin/CHANGELOG.md index 3d5590c..195dfd1 100644 --- a/changelog/mediation/mobileads-applovin/CHANGELOG.md +++ b/changelog/mediation/mobileads-applovin/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log All notable changes to this project will be documented in this file. +## Version 11.10.1.1 + +#### Added +* Updated minimum supported Yandex Mobile Ads SDK version to 5.9.0 + ## Version 11.10.1.0 #### Added diff --git a/changelog/mediation/mobileads-bigoads/CHANGELOG.md b/changelog/mediation/mobileads-bigoads/CHANGELOG.md index 6a288d8..3c2e87c 100644 --- a/changelog/mediation/mobileads-bigoads/CHANGELOG.md +++ b/changelog/mediation/mobileads-bigoads/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log All notable changes to this project will be documented in this file. +## Version 2.3.2.0 + +#### Added +* Added support for BigoADS sdk version 2.3.2 +* Updated minimum supported BigoADS sdk version to 2.3.2 +* Updated minimum supported Yandex Mobile Ads SDK version to 5.9.0 + ## Version 2.2.0.0 #### Added diff --git a/changelog/mediation/mobileads-chartboost/CHANGELOG.md b/changelog/mediation/mobileads-chartboost/CHANGELOG.md index c91fc23..440c248 100644 --- a/changelog/mediation/mobileads-chartboost/CHANGELOG.md +++ b/changelog/mediation/mobileads-chartboost/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log All notable changes to this project will be documented in this file. +## Version 9.3.1.0 + +#### Added +* Added support for Chartboost sdk version 9.3.1 +* Updated minimum supported Chartboost sdk version 9.3.1 +* Updated minimum supported Yandex Mobile Ads SDK version to 5.9.0 + ## Version 9.3.0.1 #### Added diff --git a/changelog/mediation/mobileads-ironsource/CHANGELOG.md b/changelog/mediation/mobileads-ironsource/CHANGELOG.md index 0147b96..b75bca3 100644 --- a/changelog/mediation/mobileads-ironsource/CHANGELOG.md +++ b/changelog/mediation/mobileads-ironsource/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log All notable changes to this project will be documented in this file. +## Version 7.3.0.3 + +#### Updated +* Updated minimum supported Yandex Mobile Ads SDK version to 5.9.0 + ## Version 7.3.0.2 #### Updated diff --git a/changelog/mediation/mobileads-mintegral/CHANGELOG.md b/changelog/mediation/mobileads-mintegral/CHANGELOG.md index 59faf96..47d644f 100644 --- a/changelog/mediation/mobileads-mintegral/CHANGELOG.md +++ b/changelog/mediation/mobileads-mintegral/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log All notable changes to this project will be documented in this file. +## Version 7.3.9.0 + +#### Updated +* Added support for Mintegral SDK version 7.3.9 +* Updated minimum supported Mintegral SDK version to 7.3.9 +* Updated minimum supported Yandex Mobile Ads SDK version to 5.9.0 + ## Version 7.3.8.0 #### Updated diff --git a/changelog/mediation/mobileads-mytarget/CHANGELOG.md b/changelog/mediation/mobileads-mytarget/CHANGELOG.md index 5a29960..dbd0d71 100644 --- a/changelog/mediation/mobileads-mytarget/CHANGELOG.md +++ b/changelog/mediation/mobileads-mytarget/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log All notable changes to this project will be documented in this file. +## Version 5.17.5.1 + +#### Updated +* Updated minimum supported Yandex Mobile Ads SDK version to 5.9.0 + ## Version 5.17.5.0 #### Updated diff --git a/changelog/mediation/mobileads-unityads/CHANGELOG.md b/changelog/mediation/mobileads-unityads/CHANGELOG.md index 472a518..1fd1353 100644 --- a/changelog/mediation/mobileads-unityads/CHANGELOG.md +++ b/changelog/mediation/mobileads-unityads/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log All notable changes to this project will be documented in this file. +## Version 4.8.0.0 + +#### Updated +* Added support for UnityAds SDK version 4.8.0 +* Updated minimum supported UnityAds SDK version to 4.8.9 +* Updated minimum supported UnityAds SDK version to 5.9.0 + ## Version 4.7.1.1 #### Updated diff --git a/changelog/mobileads/CHANGELOG.md b/changelog/mobileads/CHANGELOG.md index 4ee5e37..b7bd506 100644 --- a/changelog/mobileads/CHANGELOG.md +++ b/changelog/mobileads/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log All notable changes to this project will be documented in this file. +# Version 5.9.0 + +#### Added +* Added improvements and fixes + # Version 5.8.0 #### Added