Skip to content

Commit afb181e

Browse files
authored
Release 5.2.0
Release 5.2.0
2 parents c129fb4 + 003986a commit afb181e

File tree

12 files changed

+34
-10
lines changed

12 files changed

+34
-10
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 5.2.0
2+
* Added a function to enable Qonversion SDK Kids mode via the builder on Android. With this mode activated, our SDK does not collect any information that violates Google Children’s Privacy Policy.
3+
* Fixed possible rare ANR (Application Not Responding) errors during Facebook Attribution collection on Android.
4+
* ! Small breaking change - the property `QUser.identityId` is made nullable as it should be. Take it into account if you are using Dart null-safety.
5+
16
## 5.1.0
27
* Added an option to customize screen presentation style.
38
* Added an option to set proxy URL for Qonversion API.

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ android {
4343

4444
dependencies {
4545
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
46-
implementation "io.qonversion.sandwich:sandwich:1.2.0"
46+
implementation "io.qonversion.sandwich:sandwich:1.3.1"
4747
implementation 'com.google.code.gson:gson:2.9.0'
4848
}

android/src/main/kotlin/com/qonversion/flutter/sdk/qonversion_flutter_sdk/QonversionPlugin.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ class QonversionPlugin : MethodCallHandler, FlutterPlugin, ActivityAware {
148148
val environmentKey = args["environment"] as? String ?: return result.noNecessaryDataError()
149149
val entitlementsCacheLifetimeKey = args["entitlementsCacheLifetime"] as? String ?: return result.noNecessaryDataError()
150150
val proxyUrl = args["proxyUrl"] as? String
151-
qonversionSandwich.initialize(context, projectKey, launchModeKey, environmentKey, entitlementsCacheLifetimeKey, proxyUrl)
151+
val kidsMode = args["kidsMode"] as? Boolean ?: false
152+
qonversionSandwich.initialize(context, projectKey, launchModeKey, environmentKey, entitlementsCacheLifetimeKey, proxyUrl, kidsMode)
152153
result.success(null)
153154
}
154155

ios/qonversion_flutter.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
1616
s.source_files = 'Classes/**/*'
1717
s.dependency 'Flutter'
1818
s.platform = :ios, '9.0'
19-
s.dependency "QonversionSandwich", "1.2.0"
19+
s.dependency "QonversionSandwich", "1.3.1"
2020

2121
# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
2222
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }

lib/src/dto/user.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class QUser {
88
final String qonversionId;
99

1010
@JsonKey(name: "identityId")
11-
final String identityId;
11+
final String? identityId;
1212

1313
QUser(this.qonversionId, this.identityId);
1414

lib/src/dto/user.g.dart

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/internal/constants.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ class Constants {
55
static const kEnvironment = 'environment';
66
static const kEntitlementsCacheLifetime = 'entitlementsCacheLifetime';
77
static const kProxyUrl = 'proxyUrl';
8+
static const kKidsMode = 'kidsMode';
89
static const kUserId = 'userId';
910
static const kData = 'data';
1011
static const kProvider = 'provider';

lib/src/internal/qonversion_internal.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import 'package:qonversion_flutter/src/internal/utils/string.dart';
1111
import 'constants.dart';
1212

1313
class QonversionInternal implements Qonversion {
14-
static const String _sdkVersion = "5.1.0";
14+
static const String _sdkVersion = "5.2.0";
1515

1616
final MethodChannel _channel = MethodChannel('qonversion_plugin');
1717

@@ -31,6 +31,7 @@ class QonversionInternal implements Qonversion {
3131
Constants.kEnvironment: StringUtils.capitalize(describeEnum(config.environment)),
3232
Constants.kEntitlementsCacheLifetime: StringUtils.capitalize(describeEnum(config.entitlementsCacheLifetime)),
3333
Constants.kProxyUrl: config.proxyUrl,
34+
Constants.kKidsMode: config.kidsMode,
3435
};
3536
_channel.invokeMethod(Constants.mInitialize, args);
3637
}

lib/src/qonversion_config.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@ class QonversionConfig {
1111

1212
final String? proxyUrl;
1313

14-
QonversionConfig(this.projectKey, this.launchMode, this.environment, this.entitlementsCacheLifetime, this.proxyUrl);
14+
final bool kidsMode;
15+
16+
QonversionConfig(this.projectKey, this.launchMode, this.environment, this.entitlementsCacheLifetime, this.proxyUrl, this.kidsMode);
1517
}

lib/src/qonversion_config_builder.dart

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ class QonversionConfigBuilder {
1111

1212
String? _proxyUrl;
1313

14+
bool _kidsMode = false;
15+
1416
QonversionConfigBuilder(this.projectKey, this.launchMode);
1517

1618

@@ -46,6 +48,17 @@ class QonversionConfigBuilder {
4648
return this;
4749
}
4850

51+
/// Android only.
52+
/// Use this function to enable Qonversion SDK Kids mode.
53+
/// With this mode activated, our SDK does not collect any information that violates Google Children’s Privacy Policy.
54+
///
55+
/// Returns builder instance for chain calls.
56+
QonversionConfigBuilder enableKidsMode()
57+
{
58+
_kidsMode = true;
59+
return this;
60+
}
61+
4962
/// Generate [QonversionConfig] instance with all the provided configurations.
5063
///
5164
/// Returns the complete [QonversionConfig] instance.
@@ -55,7 +68,8 @@ class QonversionConfigBuilder {
5568
launchMode,
5669
_environment,
5770
_entitlementsCacheLifetime,
58-
_proxyUrl
71+
_proxyUrl,
72+
_kidsMode
5973
);
6074
}
6175
}

0 commit comments

Comments
 (0)