Skip to content

Commit

Permalink
Merge pull request #302 from AppsFlyerSDK/dev/DELIVERY-54538/DMA_Fix
Browse files Browse the repository at this point in the history
Fix minor API call
  • Loading branch information
al-af authored Feb 18, 2024
2 parents 9e9030b + 42f32ad commit c46aab6
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 19 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Versions
## 6.13.0
## 6.13.0+1
- Added enableTCFDataCollection , setConsentData with AppsFlyerConsent class
- Added new boolean option to AppsFlyerOption class , manualStart
- Added startSDK API
Expand Down
8 changes: 4 additions & 4 deletions doc/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ The `AppsflyerConsent` object helps manage user consent settings. By using the s
1. Users subjected to GDPR:

```dart
var forGdpr = _appsflyerSdk.forGDPRUser(
var forGdpr = AppsFlyerConsent.forGDPRUser(
hasConsentForDataUsage: true,
hasConsentForAdsPersonalization: true
);
Expand All @@ -296,7 +296,7 @@ _appsflyerSdk.setConsentData(forGdpr);
2. Users not subject to GDPR:

```dart
var nonGdpr = _appsflyerSdk.nonGDPRUser();
var nonGdpr = AppsFlyerConsent.nonGDPRUser();
_appsflyerSdk.setConsentData(nonGdpr);
```

Expand Down Expand Up @@ -327,11 +327,11 @@ _appsflyerSdk.enableTCFDataCollection(true);
// Set Consent Data
// If user is subject to GDPR
// var forGdpr = _appsflyerSdk.forGDPRUser(hasConsentForDataUsage: true, hasConsentForAdsPersonalization: true);
// var forGdpr = AppsFlyerConsent.forGDPRUser(hasConsentForDataUsage: true, hasConsentForAdsPersonalization: true);
// _appsflyerSdk.setConsentData(forGdpr);
// If user is not subject to GDPR
var nonGdpr = _appsflyerSdk.nonGDPRUser();
var nonGdpr = AppsFlyerConsent.nonGDPRUser();
_appsflyerSdk.setConsentData(nonGdpr);
// Here we start a session
Expand Down
4 changes: 2 additions & 2 deletions example/lib/main_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ class MainPageState extends State<MainPage> {
//Setting configuration to the SDK
_appsflyerSdk.setCurrencyCode("USD");
_appsflyerSdk.enableTCFDataCollection(true);
// var forGdpr = _appsflyerSdk.forGDPRUser(hasConsentForDataUsage: true, hasConsentForAdsPersonalization: true);
// var forGdpr = AppsFlyerConsent.forGDPRUser(hasConsentForDataUsage: true, hasConsentForAdsPersonalization: true);
// _appsflyerSdk.setConsentData(forGdpr);
var nonGdpr = _appsflyerSdk.nonGDPRUser();
var nonGdpr = AppsFlyerConsent.nonGDPRUser();
_appsflyerSdk.setConsentData(nonGdpr);

// Init of AppsFlyer SDK
Expand Down
3 changes: 2 additions & 1 deletion lib/appsflyer_sdk.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

import 'src/appsflyer_consent.dart';

import 'src/callbacks.dart';

part 'src/appsflyer_constants.dart';
Expand All @@ -16,3 +16,4 @@ part 'src/appsflyer_options.dart';
part 'src/appsflyer_sdk.dart';
part 'src/udl/deep_link_result.dart';
part 'src/udl/deeplink.dart';
part 'src/appsflyer_consent.dart';
2 changes: 2 additions & 0 deletions lib/src/appsflyer_consent.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
part of appsflyer_sdk;

class AppsFlyerConsent {
final bool isUserSubjectToGDPR;
final bool hasConsentForDataUsage;
Expand Down
10 changes: 0 additions & 10 deletions lib/src/appsflyer_sdk.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,6 @@ class AppsflyerSdk {
return _instance!;
}

AppsFlyerConsent forGDPRUser({required bool hasConsentForDataUsage, required bool hasConsentForAdsPersonalization}) {
return AppsFlyerConsent.forGDPRUser(
hasConsentForDataUsage: hasConsentForDataUsage,
hasConsentForAdsPersonalization: hasConsentForAdsPersonalization);
}

AppsFlyerConsent nonGDPRUser() {
return AppsFlyerConsent.nonGDPRUser();
}

@visibleForTesting
AppsflyerSdk.private(this._methodChannel, this._eventChannel,
{this.afOptions, this.mapOptions});
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: appsflyer_sdk
description: A Flutter plugin for AppsFlyer SDK. Supports iOS and Android.
version: 6.13.0
version: 6.13.0+1

homepage: https://github.com/AppsFlyerSDK/flutter_appsflyer_sdk

Expand Down

0 comments on commit c46aab6

Please sign in to comment.