Skip to content

Commit 0ba534a

Browse files
committed
readme and changelog updates
1 parent 16408f8 commit 0ba534a

File tree

2 files changed

+31
-8
lines changed

2 files changed

+31
-8
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 1.0.0
2+
3+
* API update: new `initialize` method with just one API key argument for both platforms; deprecate `launch` method; remove all old `launch...` methods.
4+
* Add `trackPurchase` method to track Android purchases manually.
5+
* Add `addAttributionData` method implementation for Android.
6+
17
## 0.3.0
28

39
* API update: new `launch` method, deprecate all old `launch...` methods

README.md

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ dependencies:
2222
Run `flutter pub get` to install dependency.
2323

2424
## Usage
25+
26+
### Setup
27+
2528
You need to configure Qonversion once at a starting point of your app.
2629

2730
For example, launch Qonversion in `initState` of your top level widget:
@@ -42,28 +45,42 @@ void initState() {
4245
}
4346
4447
Future<String> _launchQonversion() async {
45-
_qonversionUserId = await Qonversion.launch(
46-
iosApiKey: 'YOUR_IOS_API_KEY',
47-
androidApiKey: 'YOUR_ANDROID_API_KEY',
48-
);
48+
_qonversionUserId = await Qonversion.initialize('YOUR_API_KEY');
4949
}
5050
5151
...
5252
```
5353

54-
Qonversion will track purchases automatically.
54+
**IMPORTANT**
55+
56+
On Android you must call `Qonversion.trackPurchase(skuDetails, purchase)` method on each purchase success in order to track purchases.
57+
58+
On iOS Qonversion will track purchases automatically.
5559

5660
You can also specify your client side `userId` (instead of Qonversion user-id) that will be used for matching data in the third party data:
5761

5862
```
5963
final userId = 'CLIENT_SIDE_USER_ID';
60-
Qonversion.launch(
61-
iosApiKey: 'YOUR_IOS_API_KEY',
62-
androidApiKey: 'YOUR_ANDROID_API_KEY',
64+
Qonversion.initialize(
65+
'YOUR_API_KEY',
6366
userId: userId,
6467
);
6568
```
6669

70+
### Attribution
71+
You need to have AppsFlyer SDK integrated in your app before starting with this integration. If you do not have Appsflyer integration yet, please use [this docs](https://pub.dev/packages/appsflyer_sdk#-readme-tab-).
72+
73+
On iOS you can also use Branch integration.
74+
75+
Use `addAttributionData(data, provider, userId)` method to pass attribution data dictionary:
76+
```
77+
Qonversion.addAttributionData(
78+
data,
79+
QAttributionProvider.appsFlyer,
80+
'USER_ID',
81+
)
82+
```
83+
6784
## License
6885

6986
Qonversion SDK is available under the MIT license.

0 commit comments

Comments
 (0)