Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 5.3.0
* Added function to sync the user's historical data.

## 5.2.0
* 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.
* Fixed possible rare ANR (Application Not Responding) errors during Facebook Attribution collection on Android.
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ android {

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "io.qonversion.sandwich:sandwich:1.3.1"
implementation "io.qonversion.sandwich:sandwich:1.4.0"
implementation 'com.google.code.gson:gson:2.9.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ class QonversionPlugin : MethodCallHandler, FlutterPlugin, ActivityAware {
override fun onMethodCall(call: MethodCall, result: Result) {
// Methods without args
when (call.method) {
"syncHistoricalData" -> {
qonversionSandwich.syncHistoricalData()
return result.success(null)
}
"products" -> {
return products(result)
}
Expand Down
15 changes: 0 additions & 15 deletions fastlane/report.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,5 @@




<testcase classname="fastlane.lanes" name="0: last_git_tag" time="0.034102">

</testcase>


<testcase classname="fastlane.lanes" name="1: add_git_tag" time="0.013466">

</testcase>


<testcase classname="fastlane.lanes" name="2: push_git_tags" time="1.422877">

</testcase>

</testsuite>
</testsuites>
4 changes: 4 additions & 0 deletions ios/Classes/SwiftQonversionPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ public class SwiftQonversionPlugin: NSObject, FlutterPlugin {
// MARK: - Calls without arguments

switch (call.method) {
case "syncHistoricalData":
qonversionSandwich?.syncHistoricalData()
return result(nil)

case "products":
return products(result)

Expand Down
2 changes: 1 addition & 1 deletion ios/qonversion_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
s.platform = :ios, '9.0'
s.dependency "QonversionSandwich", "1.3.1"
s.dependency "QonversionSandwich", "1.4.0"

# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
Expand Down
1 change: 1 addition & 0 deletions lib/src/internal/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class Constants {

// MethodChannel methods names
static const mInitialize = 'initialize';
static const mSyncHistoricalData = 'syncHistoricalData';
static const mProducts = 'products';
static const mPurchase = 'purchase';
static const mPurchaseProduct = 'purchaseProduct';
Expand Down
5 changes: 4 additions & 1 deletion lib/src/internal/qonversion_internal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'package:qonversion_flutter/src/internal/utils/string.dart';
import 'constants.dart';

class QonversionInternal implements Qonversion {
static const String _sdkVersion = "5.2.0";
static const String _sdkVersion = "5.3.0";

final MethodChannel _channel = MethodChannel('qonversion_plugin');

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

@override
Future<void> syncHistoricalData() => _channel.invokeMethod(Constants.mSyncHistoricalData);

@override
Future<Map<String, QEntitlement>> purchase(String productId) async {
try {
Expand Down
3 changes: 3 additions & 0 deletions lib/src/qonversion.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ abstract class Qonversion {
/// Returns App Store product ID
Stream<String> get promoPurchasesStream;

/// Call this function to sync the subscriber data with the first launch when Qonversion is implemented.
Future<void> syncHistoricalData();

/// Starts a process of purchasing product with [productId].
///
/// Throws [QPurchaseException] in case of error in purchase flow.
Expand Down
4 changes: 4 additions & 0 deletions macos/Classes/SwiftQonversionPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ public class SwiftQonversionPlugin: NSObject, FlutterPlugin {
// MARK: - Calls without arguments

switch (call.method) {
case "syncHistoricalData":
qonversionSandwich?.syncHistoricalData()
return result(nil)

case "products":
return products(result)

Expand Down
2 changes: 1 addition & 1 deletion macos/qonversion_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
s.source_files = 'Classes/**/*'
s.dependency 'FlutterMacOS'
s.platform = :osx, '10.12'
s.dependency "QonversionSandwich", "1.3.1"
s.dependency "QonversionSandwich", "1.4.0"

s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
s.swift_version = '5.0'
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: qonversion_flutter
description: Flutter plugin to implement in-app subscriptions and purchases. Validate user receipts and manage cross-platform access to paid content on your app. Android & iOS.
version: 5.2.0
version: 5.3.0
homepage: 'https://qonversion.io'
repository: 'https://github.com/qonversion/flutter-sdk'

Expand Down