app_tracking_transparency
2.0.7, released 6 months ago by he2apps.com
Shows iOS App Tracking Transparency dialog and retrieves the advertising identifier.
WASM-ready
What it does
Provides a Flutter API to request user consent for tracking on iOS 14+ and to obtain the IDFA. Handles platform-specific setup and status checks.
AI-written summary of version 2.0.7, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to comply with iOS ATT requirements for ad revenue.
- You want to access the advertising identifier after user consent.
Skip it when
- Your app targets only Android or other platforms.
- You already use another permission plugin that covers ATT.
Strengths
- Simple API focused on ATT.
- Supports both Swift Package Manager and CocoaPods.
- Keeps up‑to‑date with iOS changes.
Weaknesses
- iOS‑only; no Android functionality.
- Requires manual Info.plist configuration.
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 0
Add NSUserTrackingUsageDescription to ios/Runner/Info.plist; ensure Xcode 12+; optionally add SKAdNetworkItems per Google docs.
import 'package:app_tracking_transparency/app_tracking_transparency.dart';
void request() async {
final status = await AppTrackingTransparency.requestTrackingAuthorization();
if (status == TrackingStatus.authorized) {
final idfa = await AppTrackingTransparency.getAdvertisingIdentifier();
print('IDFA: $idfa');
}
}Alternatives
Packages that do the same job and could replace app_tracking_transparency.
- permission_handler
Provides a unified permission API for iOS, Android and other platforms, including ATT.
91Compare