Flutter SDK Privacy & Consent

The Flutter SDK exposes a small set of privacy-related switches: logging, GeoIP resolution, authorization status, App Tracking Transparency, and a user email binding. All of them require init to have completed.

Logging

await MagifyClient.instance.setLoggingEnabled(false);

GeoIP

By default the SDK may resolve the client's region from its IP address. You can read and change that behavior:

await MagifyClient.instance.setGeoIpEnabled(false);

Platform difference: Android persists this flag across launches; iOS keeps it in memory only. If your app needs geo IP resolution turned off on iOS, call setGeoIpEnabled(false) again on every launch — setting it once will not survive a restart.

Authorization status

authorizationStatus is a general-purpose tracking authorization field, modeled with AuthorizationStatus (authorized, unauthorized, unknown), that influences campaign targeting and content delivery:

await MagifyClient.instance.setAuthorizationStatus(AuthorizationStatus.authorized);

MagifyClient.instance.authorizationStatusChanges.listen((_) async {
  final status = await MagifyClient.instance.authorizationStatus;
  debugPrint('Authorization status: $status');
});

App Tracking Transparency

Future<void> setATTStatus(bool authorized) is an iOS-only convenience for reporting the system App Tracking Transparency (ATT) prompt result — it is a no-op on Android, which has no ATT equivalent.

Forward the result of the system prompt (for example via the app_tracking_transparency package):

import 'package:app_tracking_transparency/app_tracking_transparency.dart';

final status = await AppTrackingTransparency.requestTrackingAuthorization();
await MagifyClient.instance.setATTStatus(status == TrackingStatus.authorized);

On iOS, this drives the same authorizationStatus shown above (true maps to authorized, false to unauthorized) — you can set authorizationStatus directly instead if you already have a status to report from elsewhere.

User email

Future<void> setUserEmail(String email) binds an email address to the client, used for mailing-list mapping. Like the other user-context setters, it is write-only — the SDK keeps it in memory and stamps it onto the analytics events it sends, but does not expose a getter. An app that wants the value to survive a restart must store it itself and call setUserEmail again on the next launch.

await MagifyClient.instance.setUserEmail('player@example.com');

The SDK does not expose a dedicated consent-string or GDPR-framework API (for example, no IAB TCF or similar consent-signal setter). If your app needs to gate SDK behavior on user consent, do so at the application level — for example, by delaying init, or by using setLoggingEnabled / setGeoIpEnabled — rather than expecting a dedicated consent API from this SDK.

Next step

Continue to Attribution to report media source, Adjust ID, Firebase instance ID and referrer information.

Related articles

IMinimalAdsMediator

ICampaignWithProducts

PurchaseStore

ICreative

MagifyManager․Logging

Obtainers