How i can retrieve Apple IDFA in Flutter App? I have already tried advertising_id plugin, but it crashes on Android and doesn't retrieve ID at IOS.
Asked
Active
Viewed 3,033 times
1 Answers
4
Did you check this package?
First add the package to your dependencies (pubspec.yaml)
dependencies:
advertising_id: ^0.9.2
Then run get packages to install it. Then add it to your file:
import 'package:advertising_id/advertising_id.dart';
Then use it like:
print(await AdvertisingId.id);
I checked it and I couldn't make it work on iOS but it is working on Android. I hope this helps.

Sevki Baba
- 336
- 1
- 8
-
2Ensure to update your info.plist file to ensure the package works for iOS, simply include a usage description
NSUserTrackingUsageDescription Usage Description – Uchenna Nnodim Oct 27 '21 at 09:29 -
I am not able to run it on android. can you tell me which version of kotlin are you using? – Ankit Apr 20 '23 at 01:43
-
@Ankit hey man, this was long ago I am not sure about the version. – Sevki Baba Apr 28 '23 at 13:26