This cordova/phonegap plugin retrieves 'Identifier for Advertisers (IDFA)' from iOS > 6 devices.
More info here
- iOS > 6.0
Install with Cordova cli
$ cordova plugin add https://github.com/burakson/Cordova-Idfa.git
Install with Phonegap cli
$ phonegap plugin add https://github.com/burakson/Cordova-Idfa.git
-
Add AdSupport.framework to the Linked Frameworks in Xcode
-
After getting deviceReady event;
Cordova.exec(cb, err, "CDVIdfa", "advertisingIdentifier", []);
function cb(m) {
console.log('Device IDFA is '+m);
}
function err(m) {
console.log('Error: '+m);
}
Try the code. If you find a problem, file an issue or create a pull request.
Thanks to @choix a.k.a Anton Volkov