Skip to content

Commit

Permalink
Release 5.9.0 (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
mobile-ads-github committed Jul 14, 2023
1 parent cee5d41 commit 350d1c4
Show file tree
Hide file tree
Showing 29 changed files with 741 additions and 89 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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 = "<group>"; };
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 = "<group>"; };
DEC81AD92A53A89B008FE935 /* YandexAdsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YandexAdsViewController.swift; sourceTree = "<group>"; };
DEC81ADB2A53B9E7008FE935 /* String+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Extensions.swift"; sourceTree = "<group>"; };
DEC81ADD2A53BE28008FE935 /* InstreamListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstreamListViewController.swift; sourceTree = "<group>"; };
DEC81ADF2A53C28D008FE935 /* NavigationTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationTableViewController.swift; sourceTree = "<group>"; };
DEC81AE12A53C840008FE935 /* NativeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NativeViewController.swift; sourceTree = "<group>"; };
DEC81AE32A53C945008FE935 /* NavigationScreenDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationScreenDataSource.swift; sourceTree = "<group>"; };
DEC81AE52A54D5A3008FE935 /* StickyBannerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StickyBannerViewController.swift; sourceTree = "<group>"; };
DEC81AE72A54D8DE008FE935 /* InlineBannerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InlineBannerViewController.swift; sourceTree = "<group>"; };
DEC81AEB2A55A2F6008FE935 /* RewardedAdViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RewardedAdViewController.swift; sourceTree = "<group>"; };
DEC81AED2A55ADEC008FE935 /* InterstitialAdViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InterstitialAdViewController.swift; sourceTree = "<group>"; };
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 = "<group>"; };
/* End PBXFileReference section */

Expand All @@ -141,6 +161,9 @@
isa = PBXGroup;
children = (
14033F6127201D9E00A24D5E /* Native */,
DEC81ADB2A53B9E7008FE935 /* String+Extensions.swift */,
DEC81ADF2A53C28D008FE935 /* NavigationTableViewController.swift */,
DEC81AE32A53C945008FE935 /* NavigationScreenDataSource.swift */,
);
path = Common;
sourceTree = "<group>";
Expand Down Expand Up @@ -328,6 +351,7 @@
147B0BC7271FFC04005F4062 /* Interstitial */,
147B0BCA27200CF3005F4062 /* Native */,
147B0BD627200F66005F4062 /* Rewarded */,
DEC81AD92A53A89B008FE935 /* YandexAdsViewController.swift */,
);
path = Yandex;
sourceTree = "<group>";
Expand All @@ -336,6 +360,7 @@
isa = PBXGroup;
children = (
147B0BC8271FFC53005F4062 /* InterstitialViewController.swift */,
DEC81AED2A55ADEC008FE935 /* InterstitialAdViewController.swift */,
);
path = Interstitial;
sourceTree = "<group>";
Expand All @@ -344,6 +369,7 @@
isa = PBXGroup;
children = (
147B0BCE27200D14005F4062 /* CustomNativeViewController.swift */,
DEC81AE12A53C840008FE935 /* NativeViewController.swift */,
14033FC32720598D00A24D5E /* TemplateNativeViewController.swift */,
);
path = Native;
Expand All @@ -353,6 +379,8 @@
isa = PBXGroup;
children = (
147B0BD427200E75005F4062 /* BannerViewController.swift */,
DEC81AE52A54D5A3008FE935 /* StickyBannerViewController.swift */,
DEC81AE72A54D8DE008FE935 /* InlineBannerViewController.swift */,
);
path = Banner;
sourceTree = "<group>";
Expand All @@ -361,6 +389,7 @@
isa = PBXGroup;
children = (
147B0BD727200FCE005F4062 /* RewardedViewController.swift */,
DEC81AEB2A55A2F6008FE935 /* RewardedAdViewController.swift */,
);
path = Rewarded;
sourceTree = "<group>";
Expand All @@ -374,6 +403,7 @@
14033F922720457800A24D5E /* Player */,
14033FA42720457800A24D5E /* Toast */,
14033FA12720457800A24D5E /* Visibility */,
DEC81ADD2A53BE28008FE935 /* InstreamListViewController.swift */,
);
path = Instream;
sourceTree = "<group>";
Expand Down Expand Up @@ -548,37 +578,47 @@
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 */,
14033F8927202CA800A24D5E /* AdMobRewardedViewController.swift in Sources */,
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 */,
Expand Down Expand Up @@ -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",
Expand All @@ -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;
};
Expand All @@ -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",
Expand All @@ -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;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Foundation

protocol NavigationScreenDataSource {
var destinationViewController: UIViewController { get }
var title: String { get }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import Foundation

class NavigationTableViewController<T: NavigationScreenDataSource>: 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)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import Foundation

extension String {
func camelCaseToWords() -> String {
map { ($0.isUppercase ? " " : "") + String($0) }
.joined(separator: "")
.trimmingCharacters(in: .whitespaces)
.localizedCapitalized
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class IronSourceInterstitialViewController: UIViewController {

func initializeIronSource() {
IronSourceManager.shared.initializeSDK()
IronSource.setInterstitialDelegate(self)
IronSource.setLevelPlayInterstitialDelegate(self)
}

@IBAction func loadAd(_ sender: UIButton) {
Expand All @@ -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")
}
}
Original file line number Diff line number Diff line change
@@ -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/
Expand All @@ -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()
}
}
Loading

0 comments on commit 350d1c4

Please sign in to comment.