From 42f32ade96199e71059ad96b4c96d49191330e78 Mon Sep 17 00:00:00 2001 From: Amit Levy Date: Sun, 18 Feb 2024 15:54:22 +0200 Subject: [PATCH] Fix minor API call --- CHANGELOG.md | 2 +- doc/API.md | 8 ++++---- example/lib/main_page.dart | 4 ++-- lib/appsflyer_sdk.dart | 3 ++- lib/src/appsflyer_consent.dart | 2 ++ lib/src/appsflyer_sdk.dart | 10 ---------- pubspec.yaml | 2 +- 7 files changed, 12 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aaea431..9632e6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/doc/API.md b/doc/API.md index 82b6926..5382eb2 100644 --- a/doc/API.md +++ b/doc/API.md @@ -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 ); @@ -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); ``` @@ -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 diff --git a/example/lib/main_page.dart b/example/lib/main_page.dart index ddae0b9..e8f1ad9 100644 --- a/example/lib/main_page.dart +++ b/example/lib/main_page.dart @@ -36,9 +36,9 @@ class MainPageState extends State { //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 diff --git a/lib/appsflyer_sdk.dart b/lib/appsflyer_sdk.dart index e95fed9..0ad536b 100644 --- a/lib/appsflyer_sdk.dart +++ b/lib/appsflyer_sdk.dart @@ -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'; @@ -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'; diff --git a/lib/src/appsflyer_consent.dart b/lib/src/appsflyer_consent.dart index 5631a71..300c708 100644 --- a/lib/src/appsflyer_consent.dart +++ b/lib/src/appsflyer_consent.dart @@ -1,3 +1,5 @@ +part of appsflyer_sdk; + class AppsFlyerConsent { final bool isUserSubjectToGDPR; final bool hasConsentForDataUsage; diff --git a/lib/src/appsflyer_sdk.dart b/lib/src/appsflyer_sdk.dart index c11b382..46c0591 100644 --- a/lib/src/appsflyer_sdk.dart +++ b/lib/src/appsflyer_sdk.dart @@ -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}); diff --git a/pubspec.yaml b/pubspec.yaml index 8a5d8f1..ad9d8bb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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