Releases: qonversion/flutter-sdk
3.1.0
What's new
Identity
Call this function to link a user to his unique ID in your system and share purchase data.
Qonversion.identify("your_custom_user_id");Call this function to unlink a user from his unique ID in your system and his purchase data.
Qonversion.logout();Support for AppStore promo purchases
Qonversion.promoPurchasesStream.listen((productID) async {
try {
// check AppStore productID value in case you want to enable promoted purchase only for specific products
// call `promoPurchase` if you want to allow promo purchase or just store productID and call when needed
// don't call `promoPurchase` if you don't want to allow purchase
final permissions = await Qonversion.promoPurchase(productID);
} catch (e) {
print(e);
}
});3.0.1
What's new
- Fix QOfferings mapping error.
- Internal logic optimization for Android.
3.0.0
What's new
- Add null safety support.
- Increase min Dart SDK version to 2.12.0.
2.5.2
What's new
iOS updates
- SKProduct issue fix
- Unfinished transactions fix
- Minor improvements
2.5.1
What's new
- IDFA for iOS 14.5+
On iOS 14.5+, after requesting the app tracking permission using ATT, you need to notify Qonversion if tracking is allowed and IDFA is available.
Just callQonversion.setAdvertisingID();
2.5.0
What's new
- MacOS support
2.4.1
What's new
Internal logic optimization and minor improvements
2.4.0
What's new
Deferred transactions
Now you can set the listener, which will be called when deferred transactions state will update.
Qonversion.updatedPurchasesStream.listen((permissions) => {
// handle updated permissions here
});2.3.0
What's new
Cache
From now SDK will return all requested info (products/offerings/permissions) even in case of an internet connection error, the server problem, etc if cached data is not outdated.
2.2.0
What's new
- Offerings
- Intro eligibility
- Trial duration
- Detailed errors and enum logs
- Purchase processing after failed launch or store products requests
- Bugfixes and improvements under the hood
Offerings
An offering is a group of products that you can offer to a user on a given paywall based on your business logic. For example, you can offer one set of products on a paywall immediately after onboarding and another set of products with discounts later on if a user has not converted.
Offerings allow changing the products offered remotely without releasing app updates.
try {
final QOfferings offerings = await Qonversion.offerings();
final QOffering discount = offerings.offeringForIdentifier("discount");
if (discount != null) {
// Offering is available
// Display products
}
} catch (e) {
print(e);
}We strongly recommend switching to Qonversion Offerings. This allows to:
- Change products offered to your users without app release
- Run A/B tests
- Store products and experiment results in one place with aggregated data on them
Intro eligibility
You can check if a user is eligible for an introductory offer, including a free trial. On the Apple platform, users who have not previously used an introductory offer for any products in the same subscription group are eligible for an introductory offer. Use this method to determine eligibility.
You can show only a regular price for users who are not eligible for an introductory offer.
try {
final Map<String, QEligibility> eligibility = await Qonversion.checkTrialIntroEligibility(['main', 'premium']);
final QEligibility mainProductStatus = eligibility['main'];
if (mainProductStatus.status == QEligibilityStatus.eligible) {
// handle available trial
}
} catch (e) {
print(e);
}Trial duration
From now you can check the product’s trial duration using QNTrialDuration Enum.
If the duration is not from enum range we will return QNTrialDurationOther then you can check trial duration directly from the product's skProduct.
try {
final Map<String, QProduct> products = await Qonversion.products();
final QProduct mainProduct = products['main'];
if (mainProduct.trialDuration == QTrialDuration.twoWeeks) {
// handle two weeks trial duration
}
} catch (e) {
print(e);
}