![]() |
| ca-app-pub-0121577198857509~3332380085 this is a unique ADMOB_APP_ID generate it on your own adsMob platform to solve the iOS problem with ITM-90809 IOS Deprecated API Usage #418 i hope |
import { NgModule } from '@angular/core';import { BrowserModule } from '@angular/platform-browser';import { RouteReuseStrategy } from '@angular/router';import { IonicModule, IonicRouteStrategy } from '@ionic/angular';import { SplashScreen } from '@ionic-native/splash-screen/ngx';import { StatusBar } from '@ionic-native/status-bar/ngx';import { AppComponent } from './app.component';import { AppRoutingModule } from './app-routing.module';import { AdMobFree } from '@ionic-native/admob-free/ngx';@NgModule({declarations: [AppComponent],entryComponents: [],imports: [BrowserModule,IonicModule.forRoot(),AppRoutingModule],providers: [StatusBar,SplashScreen,AdMobFree,{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }],bootstrap: [AppComponent]})export class AppModule {}
import { ElementRef, Component, ViewChild } from '@angular/core';import { NavController } from '@ionic/angular';import { DomSanitizer, SafeUrl } from '@angular/platform-browser';import { ActivatedRoute } from '@angular/router';import { AdMobFree, AdMobFreeBannerConfig,AdMobFreeInterstitialConfig,AdMobFreeRewardVideoConfig } from '@ionic-native/admob-free/ngx';declare var app_toc: any;@Component({selector: 'app-home',templateUrl: 'home.html',styleUrls: ['home.scss']})export class HomePage {currentPage: any;pages: any;url: SafeUrl;id: string;constructor(private admobFree: AdMobFree, private route: ActivatedRoute, public navCtrl: NavController, private sanitizer: DomSanitizer, public myElement: ElementRef) {// app varsthis.pages = app_toc;this.id = this.route.snapshot.paramMap.get('id');// navigation varsthis.currentPage = this.pages[+this.id];this.url = sanitizer.bypassSecurityTrustResourceUrl(this.currentPage.url);}showBannerAd() {let bannerConfig: AdMobFreeBannerConfig = {// isTesting: false, // Remove in productionautoShow: true,// id: "ca-app-pub-0121577198857509/7759224572" //iosid: "ca-app-pub-0121577198857509/1253011655" // android};this.admobFree.banner.config(bannerConfig);this.admobFree.banner.prepare().then(() => {// success}).catch(e => alert(e));}showInterstitialAds(){let interstitialConfig: AdMobFreeInterstitialConfig = {// isTesting: true, // Remove in productionautoShow: true,// id: "ca-app-pub-0121577198857509/6174680160" //iosid: "ca-app-pub-0121577198857509/4257367374" // android};this.admobFree.interstitial.config(interstitialConfig);this.admobFree.interstitial.prepare().then(() => {}).catch(e => alert(e));}showRewardVideoAds(){let RewardVideoConfig: AdMobFreeRewardVideoConfig = {// isTesting: true, // Remove in productionautoShow: true,// id: "ca-app-pub-0121577198857509/8880734556" //iosid: "ca-app-pub-0121577198857509/2313730318" //android};this.admobFree.rewardVideo.config(RewardVideoConfig);this.admobFree.rewardVideo.prepare().then(() => {}).catch(e => alert(e));}}
<ion-content scroll="true" overflow-scroll="true"><ion-button id="banner" style="width:0px; height:0px" (click)="showBannerAd()"></ion-button><ion-button id="reward" style="width:0px; height:0px" (click)="showRewardVideo()"></ion-button><ion-button id="interstitial" style="width:0px; height:0px" (click)="showInterstitialAds()"></ion-button><iframe data-tap-disabled="true" [src]=url></iframe></ion-content>
function showRewardVideo() {const e = new Event("click");try { // allow code to run in browserconst element = parent.document.getElementById("banner");element.dispatchEvent(e);} catch(e) {const element = false;}}function showBannerAd() {const e = new Event("click");try { // allow code to run in browserconst element = parent.document.getElementById("reward");element.dispatchEvent(e);} catch(e) {const element = false;}}function showInterstitialAds() {const e = new Event("click");try { // allow code to run in browserconst element = parent.document.getElementById("interstitial");element.dispatchEvent(e);} catch(e) {const element = false;}}
<platform name="ios">
<edit-config file="*-Info.plist" mode="merge" target="NSBluetoothAlwaysUsageDescription">
<string>App uses Bluetooth to find, connect and communicate with nearby devices. Please grant access. </string>
</edit-config>
<config-file parent="GADApplicationIdentifier" target="*-Info.plist">
<string>ca-app-pub-0121577198857509~5557104582</string>
</config-file>
<config-file parent="GADIsAdManagerApp" target="*-Info.plist">
<true />
</config-file>











nice information.
ReplyDeleteChinese Language Course for adults in Singapore |
Conversational Mandarin Classes Singapore |
Online mandarin training in Singapore |
Online Chinese training in Singapore |
Learn Chinese in Singapore