Skip to content

Commit

Permalink
Release 5.8.0 (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
mobile-ads-github authored Jun 30, 2023
1 parent ff8394f commit cee5d41
Show file tree
Hide file tree
Showing 46 changed files with 141 additions and 131 deletions.
1 change: 1 addition & 0 deletions Examples/YandexMobileAdsExample/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ target 'YandexMobileAdsExample' do
pod 'YandexMobileAdsAdMobAdapters'
pod 'YandexMobileAdsIronSourceAdapters'
pod 'YandexMobileAdsMediation'
pod 'YandexMobileAdsInstream'
end

post_install do |installer|
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,145 +1,73 @@
{
"images" : [
{
"filename" : "40.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"filename" : "60.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"filename" : "Icon-29.png",
"filename" : "29.png",
"idiom" : "iphone",
"scale" : "1x",
"size" : "29x29"
},
{
"filename" : "Icon-29@2x.png",
"filename" : "58.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"filename" : "Icon-29@3x.png",
"filename" : "87.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"filename" : "Icon-40@2x.png",
"filename" : "80.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"filename" : "Icon-40@3x.png",
"filename" : "120.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"filename" : "Icon-57.png",
"filename" : "57.png",
"idiom" : "iphone",
"scale" : "1x",
"size" : "57x57"
},
{
"filename" : "Icon-57@2x.png",
"filename" : "114.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "57x57"
},
{
"filename" : "Icon-60@2x.png",
"filename" : "120.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"filename" : "Icon-60@3x.png",
"filename" : "180.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"filename" : "Icon-29.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"filename" : "Icon-29@2x.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"filename" : "Icon-40.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"filename" : "Icon-40@2x.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"idiom" : "ipad",
"scale" : "1x",
"size" : "50x50"
},
{
"idiom" : "ipad",
"scale" : "2x",
"size" : "50x50"
},
{
"filename" : "Icon-72.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "72x72"
},
{
"filename" : "Icon-72@2x.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "72x72"
},
{
"filename" : "Icon-76.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"filename" : "Icon-76@2x.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"filename" : "Icon-83@2x.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"filename" : "Icon-1024.png",
"filename" : "1024.png",
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<key>CFBundleVersion</key>
<string>1</string>
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-3940256099942544~1458002511</string>
<string>ca-app-pub-4449457472880521~6005554774</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ import GoogleMobileAds

class AdMobBannerViewController: UIViewController {
private var bannerView: GADBannerView!
@IBOutlet weak var loadButton: UIButton!
@IBOutlet var loadButton: UIButton!

override func viewDidLoad() {
super.viewDidLoad()
initializeAdMob()
// Replace ca-app-pub-4449457472880521/5093091962 with Ad Unit ID generated at https://apps.admob.com".
// Replace ca-app-pub-4449457472880521/8471882114 with Ad Unit ID generated at https://apps.admob.com".
bannerView = GADBannerView(adSize: GADAdSizeBanner)
bannerView.adUnitID = "ca-app-pub-4449457472880521/5093091962"
bannerView.adUnitID = "ca-app-pub-4449457472880521/8471882114"
bannerView.delegate = self
bannerView.rootViewController = self
bannerView.translatesAutoresizingMaskIntoConstraints = false
}

func initializeAdMob() {
loadButton.isUserInteractionEnabled = false
GADMobileAds.sharedInstance().start { [weak self] status in
GADMobileAds.sharedInstance().start { [weak self] _ in
DispatchQueue.main.async {
self?.loadButton.isUserInteractionEnabled = true
}
Expand All @@ -35,7 +35,7 @@ class AdMobBannerViewController: UIViewController {
banner.removeFromSuperview()
view.addSubview(banner)

var layoutGuide = self.view.layoutMarginsGuide
var layoutGuide = view.layoutMarginsGuide
if #available(iOS 11.0, *) {
layoutGuide = self.view.safeAreaLayoutGuide
}
Expand All @@ -46,7 +46,7 @@ class AdMobBannerViewController: UIViewController {
NSLayoutConstraint.activate(constraints)
}

@IBAction func loadAd(_ sender: UIButton) {
@IBAction func loadAd(_: UIButton) {
bannerView.load(GADRequest())
}
}
Expand All @@ -57,7 +57,7 @@ extension AdMobBannerViewController: GADBannerViewDelegate {
print("Ad view did receive ad")
}

func bannerView(_ bannerView: GADBannerView, didFailToReceiveAdWithError error: Error) {
func bannerView(_: GADBannerView, didFailToReceiveAdWithError error: Error) {
print("Ad view did fail to receive ad with error: \(error)")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import GoogleMobileAds

class AdMobInterstitialViewController: UIViewController {
var interstitial: GADInterstitialAd?
@IBOutlet weak var showButton: UIButton!
@IBOutlet weak var loadButton: UIButton!
@IBOutlet var showButton: UIButton!
@IBOutlet var loadButton: UIButton!

override func viewDidLoad() {
super.viewDidLoad()
Expand All @@ -19,18 +19,18 @@ class AdMobInterstitialViewController: UIViewController {

func initializeAdMob() {
loadButton.isUserInteractionEnabled = false
GADMobileAds.sharedInstance().start { [weak self] status in
GADMobileAds.sharedInstance().start { [weak self] _ in
DispatchQueue.main.async {
self?.loadButton.isUserInteractionEnabled = true
}
}
}

@IBAction func loadAd(_ sender: UIButton) {
self.showButton.isEnabled = false
@IBAction func loadAd(_: UIButton) {
showButton.isEnabled = false

// Replace ca-app-pub-4449457472880521/5935222734 with Ad Unit ID generated at https://apps.admob.com".
GADInterstitialAd.load(withAdUnitID:"ca-app-pub-4449457472880521/5935222734",
// Replace ca-app-pub-4449457472880521/3027983741 with Ad Unit ID generated at https://apps.admob.com".
GADInterstitialAd.load(withAdUnitID: "ca-app-pub-4449457472880521/3027983741",
request: GADRequest()) { [self] ad, error in
if let error = error {
print("Did fail to receive ad with error: \(error.localizedDescription)")
Expand All @@ -42,14 +42,14 @@ class AdMobInterstitialViewController: UIViewController {
}
}
}
@IBAction func showAd(_ sender: UIButton) {

@IBAction func showAd(_: UIButton) {
interstitial?.present(fromRootViewController: self)
}
}

extension AdMobInterstitialViewController: GADFullScreenContentDelegate {
func ad(_ ad: GADFullScreenPresentingAd, didFailToPresentFullScreenContentWithError error: Error) {
func ad(_: GADFullScreenPresentingAd, didFailToPresentFullScreenContentWithError error: Error) {
print("Did fail to present ad with error: \(error.localizedDescription)")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import GoogleMobileAds
class AdMobNativeViewController: UIViewController {
private var adLoader: GADAdLoader?
private var adView: AdMobNativeAdView?
@IBOutlet weak var loadButton: UIButton!
@IBOutlet var loadButton: UIButton!

override func viewDidLoad() {
super.viewDidLoad()
Expand All @@ -21,17 +21,17 @@ class AdMobNativeViewController: UIViewController {

func initializeAdMob() {
loadButton.isUserInteractionEnabled = false
GADMobileAds.sharedInstance().start { [weak self] status in
GADMobileAds.sharedInstance().start { [weak self] _ in
DispatchQueue.main.async {
self?.loadButton.isUserInteractionEnabled = true
}
}
}

@IBAction func loadAd(_ sender: UIButton) {
@IBAction func loadAd(_: UIButton) {
adLoader?.load(GADRequest())
}

private func createAdView() {
adView = Bundle.main.loadNibNamed("AdMobNativeAdView",
owner: nil,
Expand All @@ -44,8 +44,8 @@ class AdMobNativeViewController: UIViewController {

private func addView(_ adView: UIView) {
adView.translatesAutoresizingMaskIntoConstraints = false
self.view.addSubview(adView)
var layoutGuide = self.view.layoutMarginsGuide
view.addSubview(adView)
var layoutGuide = view.layoutMarginsGuide
if #available(iOS 11.0, *) {
layoutGuide = self.view.safeAreaLayoutGuide
}
Expand All @@ -58,8 +58,8 @@ class AdMobNativeViewController: UIViewController {
}

private func createLoader() {
// Replace ca-app-pub-4449457472880521/7598370022 with Ad Unit ID generated at https://apps.admob.com".
adLoader = GADAdLoader(adUnitID: "ca-app-pub-4449457472880521/7598370022",
// Replace ca-app-pub-4449457472880521/2142524905 with Ad Unit ID generated at https://apps.admob.com".
adLoader = GADAdLoader(adUnitID: "ca-app-pub-4449457472880521/2142524905",
rootViewController: self,
adTypes: [.native],
options: nil)
Expand All @@ -68,7 +68,7 @@ class AdMobNativeViewController: UIViewController {
}

extension AdMobNativeViewController: GADNativeAdLoaderDelegate, GADNativeAdDelegate {
func adLoader(_ adLoader: GADAdLoader, didReceive nativeAd: GADNativeAd) {
func adLoader(_: GADAdLoader, didReceive nativeAd: GADNativeAd) {
guard let adView = adView else { return }

nativeAd.delegate = self
Expand All @@ -77,7 +77,7 @@ extension AdMobNativeViewController: GADNativeAdLoaderDelegate, GADNativeAdDeleg
adView.isHidden = false
}

func adLoader(_ adLoader: GADAdLoader, didFailToReceiveAdWithError error: Error) {
func adLoader(_: GADAdLoader, didFailToReceiveAdWithError error: Error) {
print("Ad loader did fail to receive ad with error: \(error.localizedDescription)")
}
}
Loading

0 comments on commit cee5d41

Please sign in to comment.