cordova plugin add cordova plugin idfa—保存
我们这样试过了
一:
cordova.plugins.idfa.getInfo().then(function(info) {
if (!info.limitAdTracking) {
console.log('OK getting ID**********'+info.idfa || info.aaid);
}
});
无法读取未定义的属性“getInfo”
declare var androidIDFA;
@Component({
templateUrl: 'app.html',
})
export class MyApp {
googleAddId:any;
if (this.platform.is('cordova')) {
androidIDFA. getAdId(
(addId) => {
console.log(addId);
this.googleAddId=addId.adId;
},
(e) => {
console.log(e);
//This error message not works on Desktops
}
);
}
我们要走了
未定义androidfa