Skip to content

Commit 3525037

Browse files
committed
Vincent's feedback
1 parent 3eb6d97 commit 3525037

File tree

5 files changed

+24
-11
lines changed

5 files changed

+24
-11
lines changed

MediationAdapters/TeadsAppLovinAdapter/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you want to display Teads ads in your iOS application through AppLovin MAX me
1212

1313
## Features
1414

15-
- ✅ Displaying Teads banners
15+
- ✅ Displaying Teads inRead ads
1616
- ✅ Displaying Teads native ads
1717

1818
## Installation

TeadsSampleApp.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
E954312627CD03E8005004B4 /* AppLovinNativeAdView.xib in Resources */ = {isa = PBXBuildFile; fileRef = E954312327CD03E8005004B4 /* AppLovinNativeAdView.xib */; };
4242
E954312727CD03E8005004B4 /* AppLovinNativeAdView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E954312427CD03E8005004B4 /* AppLovinNativeAdView.swift */; };
4343
E954312827CD03E8005004B4 /* NativeAppLovinTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E954312527CD03E8005004B4 /* NativeAppLovinTableViewController.swift */; };
44+
E96C1F9A27E4902D00151530 /* UIView-extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = E96C1F9927E4902D00151530 /* UIView-extension.swift */; };
4445
E9984EEA26AF3CCC000D42D3 /* NativeDirectTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9984ED826AF3CCC000D42D3 /* NativeDirectTableViewController.swift */; };
4546
E9984EEB26AF3CCC000D42D3 /* NativeDirectCollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9984EDA26AF3CCC000D42D3 /* NativeDirectCollectionViewController.swift */; };
4647
E9984EED26AF3CCC000D42D3 /* NativeAdmobTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E9984EDF26AF3CCC000D42D3 /* NativeAdmobTableViewController.swift */; };
@@ -107,6 +108,7 @@
107108
E954312327CD03E8005004B4 /* AppLovinNativeAdView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = AppLovinNativeAdView.xib; sourceTree = "<group>"; };
108109
E954312427CD03E8005004B4 /* AppLovinNativeAdView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppLovinNativeAdView.swift; sourceTree = "<group>"; };
109110
E954312527CD03E8005004B4 /* NativeAppLovinTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NativeAppLovinTableViewController.swift; sourceTree = "<group>"; };
111+
E96C1F9927E4902D00151530 /* UIView-extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView-extension.swift"; sourceTree = "<group>"; };
110112
E9984ED826AF3CCC000D42D3 /* NativeDirectTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NativeDirectTableViewController.swift; sourceTree = "<group>"; };
111113
E9984EDA26AF3CCC000D42D3 /* NativeDirectCollectionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NativeDirectCollectionViewController.swift; sourceTree = "<group>"; };
112114
E9984EDF26AF3CCC000D42D3 /* NativeAdmobTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NativeAdmobTableViewController.swift; sourceTree = "<group>"; };
@@ -149,6 +151,7 @@
149151
children = (
150152
4079F242252CBE7F00B0AC31 /* ColorExtension.swift */,
151153
B50425CF252E078B00ABF07D /* String.swift */,
154+
E96C1F9927E4902D00151530 /* UIView-extension.swift */,
152155
);
153156
path = Extensions;
154157
sourceTree = "<group>";
@@ -795,6 +798,7 @@
795798
E9984EF926B2D46F000D42D3 /* FakeArticleNativeTableViewCell.swift in Sources */,
796799
4079F243252CBE7F00B0AC31 /* ColorExtension.swift in Sources */,
797800
B5966D20269DCF2D005CA2FF /* InReadMopubTableViewController.swift in Sources */,
801+
E96C1F9A27E4902D00151530 /* UIView-extension.swift in Sources */,
798802
E9B7170627C7965900FB7DCB /* InReadAppLovinScrollViewController.swift in Sources */,
799803
B5966D1F269D9982005CA2FF /* InReadAdmobWebViewController.swift in Sources */,
800804
E9984EED26AF3CCC000D42D3 /* NativeAdmobTableViewController.swift in Sources */,

TeadsSampleApp/Controllers/Native/AppLovin/TableView/AppLovinNativeAdView.swift

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,3 @@ import MoPubSDK
1717
class AppLovinNativeAdView: MANativeAdView {
1818

1919
}
20-
21-
extension UIView {
22-
static func loadNib(nibName name: String? = nil) -> Self? {
23-
let nibName = name ?? String(describing: Self.self)
24-
let bundle = Bundle(for: Self.self)
25-
let nib = UINib(nibName: nibName, bundle: bundle)
26-
return nib.instantiate(withOwner: self, options: nil).first as? Self
27-
}
28-
}

TeadsSampleApp/Controllers/Native/AppLovin/TableView/NativeAppLovinTableViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class NativeAppLovinTableViewController: TeadsViewController {
3939

4040
func loadAd() {
4141
// FIXME This ids should be replaced by your own AppLovin AdUnitId
42-
let APPLOVIN_AD_UNIT_ID = "b87480e23dd55a79" //TODO replace by self.pid
42+
let APPLOVIN_AD_UNIT_ID = pid
4343
nativeAdLoader = MANativeAdLoader(adUnitIdentifier: APPLOVIN_AD_UNIT_ID)
4444

4545
// Setting the modal parent view controller.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//
2+
// UIView-extension.swift
3+
// TeadsSampleApp
4+
//
5+
// Created by Paul Nicolas on 18/03/2022.
6+
// Copyright © 2022 Teads. All rights reserved.
7+
//
8+
9+
import UIKit
10+
11+
extension UIView {
12+
static func loadNib(nibName name: String? = nil) -> Self? {
13+
let nibName = name ?? String(describing: Self.self)
14+
let bundle = Bundle(for: Self.self)
15+
let nib = UINib(nibName: nibName, bundle: bundle)
16+
return nib.instantiate(withOwner: self, options: nil).first as? Self
17+
}
18+
}

0 commit comments

Comments
 (0)