@znix wrote:
I have installed admob free plugin, using the exact same code from the documentation: https://ionicframework.com/docs/native/admob-free/
I have wrapped this code in a function which I call in my constructor
const bannerConfig: AdMobFreeBannerConfig = { // add your config here // for the sake of this example we will just use the test config isTesting: true, autoShow: true }; this.admobFree.banner.config(bannerConfig); this.admobFree.banner.prepare() .then(() => { // banner Ad is ready // if we set autoShow to false, then we will need to call the show method here }) .catch(e => console.log(e));
however I get the following error on the line with this statement: this.admobFree.banner.config(bannerConfig);
core.js:1449 ERROR Error: Uncaught (in promise): TypeError: Object(…) is not a function
TypeError: Object(…) is not a function
at AdMobFreeBanner.config (index.js:91)
at HomePage. (home.ts:104)
at step (main.js:972)
at Object.next (main.js:953)
at main.js:947
at new t (polyfills.js:3)
at webpackJsonp.54.__awaiter (main.js:943)
at HomePage.webpackJsonp.54.HomePage.bannerAd (home.ts:98)
at new HomePage (home.ts:90)
at createClass (core.js:12491)
at AdMobFreeBanner.config (index.js:91)
at HomePage. (home.ts:104)
at step (main.js:972)
at Object.next (main.js:953)
at main.js:947
at new t (polyfills.js:3)
at webpackJsonp.54.__awaiter (main.js:943)
at HomePage.webpackJsonp.54.HomePage.bannerAd (home.ts:98)
at new HomePage (home.ts:90)
at createClass (core.js:12491)
at c (polyfills.js:3)
at new t (polyfills.js:3)
at webpackJsonp.54.__awaiter (main.js:943)
at HomePage.webpackJsonp.54.HomePage.bannerAd (home.ts:98)
at new HomePage (home.ts:90)
at createClass (core.js:12491)
at createDirectiveInstance (core.js:12326)
at createViewNodes (core.js:13784)
at createRootView (core.js:13673)
at callWithDebugContext (core.js:15098)Can someone please advise, is it something to do with my plugin version and ionic native core?
Posts: 1
Participants: 1