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 @@
## 2.5.1
* iOS 14.5 advertising ID support

## 2.5.0
* MacOS support

Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group 'com.qonversion.flutter.sdk.qonversion_flutter_sdk'
version '2.4.1'
version '2.4.2'

buildscript {
ext.kotlin_version = '1.3.50'
Expand Down
4 changes: 4 additions & 0 deletions ios/Classes/SwiftQonversionFlutterSdkPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ public class SwiftQonversionFlutterSdkPlugin: NSObject, FlutterPlugin {
case "setDebugMode":
Qonversion.setDebugMode()
return result(nil)

case "setAdvertisingID":
Qonversion.setAdvertisingID()
return result(nil)

case "offerings":
return offerings(result)
Expand Down
4 changes: 2 additions & 2 deletions ios/qonversion_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
Pod::Spec.new do |s|
s.name = 'qonversion_flutter'
s.version = '2.4.1'
s.version = '2.4.2'
s.summary = 'Flutter Qonversion SDK'
s.description = <<-DESC
Powerful yet simple subscription analytics
Expand All @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
s.platform = :ios, '9.0'
s.dependency 'Qonversion', '2.11.3'
s.dependency 'Qonversion', '2.13.2'

# 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/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class Constants {
static const mSyncPurchases = 'syncPurchases';
static const mAddAttributionData = 'addAttributionData';
static const mSetDebugMode = 'setDebugMode';
static const mSetAdvertisingID = 'setAdvertisingID';
static const mOfferings = 'offerings';
static const mCheckTrialIntroEligibility = 'checkTrialIntroEligibility';
static const mStoreSdkInfo = 'storeSdkInfo';
Expand Down
12 changes: 11 additions & 1 deletion lib/src/qonversion.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import 'models/purchase_exception.dart';
import 'qa_provider.dart';

class Qonversion {
static const String _sdkVersion = "2.5.0";
static const String _sdkVersion = "2.5.1";

static const MethodChannel _channel = MethodChannel('qonversion_flutter_sdk');
static const _purchasesEventChannel =
Expand Down Expand Up @@ -192,6 +192,16 @@ class Qonversion {
static Future<void> setDebugMode() =>
_channel.invokeMethod(Constants.mSetDebugMode);

/// iOS only. Returns `null` if called on Android.
/// 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.
static Future<void> setAdvertisingID() {
if (Platform.isAndroid) {
return null;
}

return _channel.invokeMethod(Constants.mSetAdvertisingID);
}

/// Return Qonversion Offerings Object
/// 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.
Expand Down
4 changes: 4 additions & 0 deletions macos/Classes/SwiftQonversionFlutterSdkPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ public class SwiftQonversionFlutterSdkPlugin: NSObject, FlutterPlugin {
case "setDebugMode":
Qonversion.setDebugMode()
return result(nil)

case "setAdvertisingID":
Qonversion.setAdvertisingID()
return result(nil)

case "offerings":
return offerings(result)
Expand Down
4 changes: 2 additions & 2 deletions macos/qonversion_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
Pod::Spec.new do |s|
s.name = 'qonversion_flutter'
s.version = '1.0.0'
s.version = '1.0.1'
s.summary = 'Flutter Qonversion SDK'
s.description = <<-DESC
Powerful yet simple subscription analytics
Expand All @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
s.source_files = 'Classes/**/*'
s.dependency 'FlutterMacOS'
s.platform = :osx, '10.12'
s.dependency 'Qonversion', '2.11.3'
s.dependency 'Qonversion', '2.13.2'
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
s.swift_version = '5.0'
s.static_framework = true
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: In-App Subscription Infrastructure to grow your subscription business
version: 2.5.0
version: 2.5.1
homepage: 'https://qonversion.io'
repository: 'https://github.com/qonversion/flutter-sdk'

Expand Down