cordova-plugin-idfa icon indicating copy to clipboard operation
cordova-plugin-idfa copied to clipboard

requestPermission not showing dialog on iPad

Open bigreni opened this issue 2 years ago • 1 comments

The permission dialog works fine on iPhone but the dialog is not showing on the iPad simulators. I am using the sample code provided in the example.

    const idfaPlugin = cordova.plugins.idfa;

    idfaPlugin.getInfo()
        .then(info => {
            if (!info.trackingLimited) {
                return info.idfa || info.aaid;
            } else if (info.trackingPermission === idfaPlugin.TRACKING_PERMISSION_NOT_DETERMINED) {
                return idfaPlugin.requestPermission().then(result => {
                    if (result === idfaPlugin.TRACKING_PERMISSION_AUTHORIZED) {
                        return idfaPlugin.getInfo().then(info => {
                            return info.idfa || info.aaid;
                        });
                    }
                });
            }
        });

I am using Appetize.io for the simulator (iPad Air 2, iOS 14.5). Has anyone else had this problem?

Thanks for your help

bigreni avatar Dec 03 '22 21:12 bigreni

you may have disabled the "allow apps to request to track" flag in your ios settings (privacy & security => tracking)

timonmasberg avatar Mar 29 '23 21:03 timonmasberg