Skip to content

Commit 8a64074

Browse files
committed
Merge branch 'release/2.1.0' into main
2 parents 12b24a4 + 3d6480b commit 8a64074

File tree

10 files changed

+36
-12
lines changed

10 files changed

+36
-12
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 2.1.0
2+
* Add `setDebugMode()` method
3+
14
## 2.0.1
25
* Fix iOS timestamp mapping
36

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Qonversion provides full in-app purchases infrastructure, so you do not need to
1717
Implement in-app subscriptions, validate user receipts, check subscription status, and provide access to your app features and content using our StoreKit wrapper and Google Play Billing wrapper.
1818
</p>
1919

20-
Read more in [documentation](https://docs.qonversion.io).
20+
Check the [documentation](https://docs.qonversion.io) to learn details on implementing and using Qonversion SDKs.
2121

2222
[![Pub](https://img.shields.io/pub/v/qonversion_flutter.svg)](https://pub.dev/packages/qonversion_flutter)
2323
[![MIT License](http://img.shields.io/cocoapods/l/Qonversion.svg?style=flat)](http://qonversion.io)
@@ -32,8 +32,8 @@ Read more in [documentation](https://docs.qonversion.io).
3232

3333
1. Application calls the purchase method to initialize Qonversion SDK.
3434
2. Qonversion SDK communicates with StoreKit or Google Billing Client to make a purchase.
35-
3. If a purchase is successful, the SDK sends a request to Qonversion API for server-to-server validation of purchase. Qonversion server unlocks permissions associated with the product.
36-
4. SDK returns control to the application with a processing state
35+
3. If a purchase is successful, the SDK sends a request to Qonversion API for server-to-server purchase validation. Qonversion server receives accurate information on the in-app purchase status and user entitlements.
36+
4. SDK returns control to the application with a processing state.
3737

3838
## Analytics
3939

@@ -53,3 +53,8 @@ Share your iOS and Android in-app subscription data with your favorite platforms
5353
<a href="https://qonversion.io"><img width="500" src="https://qonversion.io/img/illustrations/pic-integration.svg">
5454
</a>
5555
</p>
56+
57+
58+
## License
59+
60+
Qonversion SDK is available under the MIT license.

android/build.gradle

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
group 'com.qonversion.flutter.sdk.qonversion_flutter_sdk'
2-
version '2.0.1'
2+
version '2.1.0'
33

44
buildscript {
55
ext.kotlin_version = '1.3.50'
6+
ext.qonversion_version = '2.2.0'
67
repositories {
78
google()
89
jcenter()
@@ -41,5 +42,5 @@ android {
4142

4243
dependencies {
4344
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
44-
implementation "com.qonversion.android.sdk:sdk:2.0.2"
45+
implementation "com.qonversion.android.sdk:sdk:$qonversion_version"
4546
}

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ class QonversionFlutterSdkPlugin internal constructor(registrar: Registrar): Met
4444
"restore" -> {
4545
return restore(result)
4646
}
47+
"setDebugMode" -> {
48+
Qonversion.setDebugMode()
49+
return result.success(null)
50+
}
4751
}
4852

4953
// Methods with args
@@ -197,15 +201,13 @@ class QonversionFlutterSdkPlugin internal constructor(registrar: Registrar): Met
197201

198202
val provider = args["provider"] as? String ?: return result.noProviderError()
199203

200-
val uid = args["userId"] as? String ?: return result.noUserIdError()
201-
202204
val castedProvider = when (provider) {
203-
"appsFlyer" -> AttributionSource.APPSFLYER
205+
"appsFlyer" -> AttributionSource.AppsFlyer
204206
else -> null
205207
}
206208
?: return result.success(null)
207209

208-
Qonversion.attribution(data, castedProvider, uid)
210+
Qonversion.attribution(data, castedProvider)
209211

210212
result.success(null)
211213
}

example/lib/home.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'dart:io';
22

3+
import 'package:flutter/foundation.dart';
34
import 'package:flutter/material.dart';
45
import 'package:qonversion_flutter/qonversion_flutter.dart';
56

@@ -106,6 +107,10 @@ class _HomeViewState extends State<HomeView> {
106107
isObserveMode: false,
107108
);
108109

110+
if (kDebugMode) {
111+
await Qonversion.setDebugMode();
112+
}
113+
109114
setState(() {});
110115
}
111116

ios/Classes/SwiftQonversionFlutterSdkPlugin.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ public class SwiftQonversionFlutterSdkPlugin: NSObject, FlutterPlugin {
2323
case "restore":
2424
return restore(result)
2525

26+
case "setDebugMode":
27+
Qonversion.setDebugMode()
28+
return result(nil)
29+
2630
default:
2731
break
2832
}

ios/qonversion_flutter.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
Pod::Spec.new do |s|
66
s.name = 'qonversion_flutter'
7-
s.version = '2.0.1'
7+
s.version = '2.1.0'
88
s.summary = 'Flutter Qonversion SDK'
99
s.description = <<-DESC
1010
Powerful yet simple subscription analytics
@@ -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 'Qonversion', '2.6.3'
19+
s.dependency 'Qonversion', '2.6.4'
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/constants.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ class Constants {
2828
static const mSetUserProperty = 'setUserProperty';
2929
static const mSyncPurchases = 'syncPurchases';
3030
static const mAddAttributionData = 'addAttributionData';
31+
static const mSetDebugMode = 'setDebugMode';
3132
}

lib/src/qonversion.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,4 +166,7 @@ class Qonversion {
166166

167167
return _channel.invokeMethod(Constants.mAddAttributionData, args);
168168
}
169+
170+
static Future<void> setDebugMode() =>
171+
_channel.invokeMethod(Constants.mSetDebugMode);
169172
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: qonversion_flutter
22
description: In-App Subscription Infrastructure to grow your subscription business
3-
version: 2.0.1
3+
version: 2.1.0
44
homepage: 'https://qonversion.io'
55
repository: 'https://github.com/qonversion/flutter-sdk'
66

0 commit comments

Comments
 (0)