Skip to content

Commit 652ff92

Browse files
Merge pull request #219 from qonversion/release/5.3.0
Release 5.3.0
2 parents afb181e + ad2d150 commit 652ff92

File tree

12 files changed

+27
-20
lines changed

12 files changed

+27
-20
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 5.3.0
2+
* Added function to sync the user's historical data.
3+
14
## 5.2.0
25
* 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.
36
* Fixed possible rare ANR (Application Not Responding) errors during Facebook Attribution collection on Android.

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.3.1"
46+
implementation "io.qonversion.sandwich:sandwich:1.4.0"
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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ class QonversionPlugin : MethodCallHandler, FlutterPlugin, ActivityAware {
8787
override fun onMethodCall(call: MethodCall, result: Result) {
8888
// Methods without args
8989
when (call.method) {
90+
"syncHistoricalData" -> {
91+
qonversionSandwich.syncHistoricalData()
92+
return result.success(null)
93+
}
9094
"products" -> {
9195
return products(result)
9296
}

fastlane/report.xml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,5 @@
44

55

66

7-
8-
<testcase classname="fastlane.lanes" name="0: last_git_tag" time="0.034102">
9-
10-
</testcase>
11-
12-
13-
<testcase classname="fastlane.lanes" name="1: add_git_tag" time="0.013466">
14-
15-
</testcase>
16-
17-
18-
<testcase classname="fastlane.lanes" name="2: push_git_tags" time="1.422877">
19-
20-
</testcase>
21-
227
</testsuite>
238
</testsuites>

ios/Classes/SwiftQonversionPlugin.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ public class SwiftQonversionPlugin: NSObject, FlutterPlugin {
4444
// MARK: - Calls without arguments
4545

4646
switch (call.method) {
47+
case "syncHistoricalData":
48+
qonversionSandwich?.syncHistoricalData()
49+
return result(nil)
50+
4751
case "products":
4852
return products(result)
4953

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.3.1"
19+
s.dependency "QonversionSandwich", "1.4.0"
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/internal/constants.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class Constants {
2828

2929
// MethodChannel methods names
3030
static const mInitialize = 'initialize';
31+
static const mSyncHistoricalData = 'syncHistoricalData';
3132
static const mProducts = 'products';
3233
static const mPurchase = 'purchase';
3334
static const mPurchaseProduct = 'purchaseProduct';

lib/src/internal/qonversion_internal.dart

Lines changed: 4 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.2.0";
14+
static const String _sdkVersion = "5.3.0";
1515

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

@@ -52,6 +52,9 @@ class QonversionInternal implements Qonversion {
5252
Stream<String> get promoPurchasesStream =>
5353
_promoPurchasesEventChannel.receiveBroadcastStream().cast<String>();
5454

55+
@override
56+
Future<void> syncHistoricalData() => _channel.invokeMethod(Constants.mSyncHistoricalData);
57+
5558
@override
5659
Future<Map<String, QEntitlement>> purchase(String productId) async {
5760
try {

lib/src/qonversion.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ abstract class Qonversion {
4343
/// Returns App Store product ID
4444
Stream<String> get promoPurchasesStream;
4545

46+
/// Call this function to sync the subscriber data with the first launch when Qonversion is implemented.
47+
Future<void> syncHistoricalData();
48+
4649
/// Starts a process of purchasing product with [productId].
4750
///
4851
/// Throws [QPurchaseException] in case of error in purchase flow.

macos/Classes/SwiftQonversionPlugin.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ public class SwiftQonversionPlugin: NSObject, FlutterPlugin {
3535
// MARK: - Calls without arguments
3636

3737
switch (call.method) {
38+
case "syncHistoricalData":
39+
qonversionSandwich?.syncHistoricalData()
40+
return result(nil)
41+
3842
case "products":
3943
return products(result)
4044

0 commit comments

Comments
 (0)