File tree Expand file tree Collapse file tree 2 files changed +13
-14
lines changed
TeadsSampleApp/Controllers
InRead/AppLovin/ScrollView
Native/AppLovin/TableView Expand file tree Collapse file tree 2 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -23,21 +23,17 @@ class InReadAppLovinScrollViewController: TeadsViewController {
23
23
super. viewDidLoad ( )
24
24
25
25
ALSdk . shared ( ) ? . mediationProvider = " MAAdapterTeadsMediation "
26
- ALSdk . shared ( ) ? . initializeSdk ( )
27
-
26
+ ALSdk . shared ( ) !. initializeSdk { [ weak self] ( configuration: ALSdkConfiguration ) in
27
+ self ? . loadAd ( )
28
+ }
29
+ }
30
+
31
+ func loadAd( ) {
28
32
// FIXME This ids should be replaced by your own AppLovin AdUnitId
29
33
let APPLOVIN_AD_UNIT_ID = " ebe5409dd16b929d " //TODO replace by self.pid
30
34
bannerView = MAAdView ( adUnitIdentifier: APPLOVIN_AD_UNIT_ID)
31
35
bannerView. stopAutoRefresh ( )
32
- loadAd ( )
33
36
34
- let nativeAdView = MANativeAdView ( )
35
- nativeAdView. bindViews ( with: MANativeAdViewBinder { builder in
36
- builder. advertiserLabelTag = 1
37
- } ) //Binds the native asset ad views to this native ad using view tags.
38
- }
39
-
40
- func loadAd( ) {
41
37
let settings = TeadsAdapterSettings { ( settings) in
42
38
settings. enableDebug ( )
43
39
settings. pageUrl ( " https://teads.com " )
Original file line number Diff line number Diff line change @@ -30,14 +30,17 @@ class NativeAppLovinTableViewController: TeadsViewController {
30
30
elements. append ( nil )
31
31
}
32
32
33
+ ALSdk . shared ( ) ? . mediationProvider = " MAAdapterTeadsMediation "
34
+ ALSdk . shared ( ) !. initializeSdk { [ weak self] ( configuration: ALSdkConfiguration ) in
35
+ self ? . loadAd ( )
36
+ }
37
+ }
38
+
39
+ func loadAd( ) {
33
40
// FIXME This ids should be replaced by your own AppLovin AdUnitId
34
41
let APPLOVIN_AD_UNIT_ID = " ebe5409dd16b929d " //TODO replace by self.pid
35
42
nativeAdLoader = MANativeAdLoader ( adUnitIdentifier: APPLOVIN_AD_UNIT_ID)
36
43
37
- loadAd ( )
38
- }
39
-
40
- func loadAd( ) {
41
44
// Setting the modal parent view controller.
42
45
let teadsAdSettings = TeadsAdapterSettings { ( settings) in
43
46
settings. enableDebug ( )
You can’t perform that action at this time.
0 commit comments