Skip to content

Commit ccedc53

Browse files
authored
Merge pull request #404 from qonversion/release/10.0.2
2 parents 75006ca + 77a551d commit ccedc53

File tree

18 files changed

+58
-39
lines changed

18 files changed

+58
-39
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 10.0.2
2+
* Fixed No-Codes source and version tracking for internal purposes.
3+
14
## 10.0.1
25
* Fixed no-code screen action bar appearance issue.
36

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ android {
5353

5454
dependencies {
5555
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
56-
implementation "io.qonversion:sandwich:6.0.9"
56+
implementation "io.qonversion:sandwich:6.0.10"
5757
implementation 'com.google.code.gson:gson:2.9.0'
5858
}

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,17 @@ class NoCodesPlugin(private val messenger: BinaryMessenger, private val context:
6060
this.screenFailedToLoadEventStreamHandler = screenFailedToLoadListener.eventStreamHandler
6161
}
6262

63-
fun initializeNoCodes(projectKey: String, result: Result) {
63+
fun initializeNoCodes(args: Map<String, Any>, result: Result) {
64+
val projectKey = args["projectKey"] as? String ?: return result.noNecessaryDataError()
65+
val version = args["version"] as? String ?: return result.noNecessaryDataError()
66+
val source = args["source"] as? String ?: return result.noNecessaryDataError()
67+
6468
if (projectKey.isNotEmpty()) {
6569
// Initialize NoCodes Sandwich
6670
noCodesSandwich = NoCodesSandwich()
71+
72+
noCodesSandwich?.storeSdkInfo(context, source, version)
73+
6774
noCodesSandwich?.initialize(context, projectKey)
6875
noCodesSandwich?.setDelegate(this)
6976
result.success(null)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class QonversionPlugin : MethodCallHandler, FlutterPlugin, ActivityAware {
133133
"storeSdkInfo" -> storeSdkInfo(args, result)
134134
"identify" -> identify(args["userId"] as? String, result)
135135
// NoCodes methods
136-
"initializeNoCodes" -> noCodesPlugin?.initializeNoCodes(args["projectKey"] as? String ?: "", result)
136+
"initializeNoCodes" -> noCodesPlugin?.initializeNoCodes(args, result)
137137
"setScreenPresentationConfig" -> noCodesPlugin?.setScreenPresentationConfig(args["config"] as? Map<String, Any>, args["contextKey"] as? String, result)
138138
"showNoCodesScreen" -> noCodesPlugin?.showNoCodesScreen(args["contextKey"] as? String, result)
139139
else -> result.notImplemented()

example/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ ios/Podfile.lock
3636

3737
# Android related
3838
android/keystore/
39+
.cxx/
3940

4041
# Web related
4142
lib/generated_plugin_registrant.dart

ios/qonversion_flutter.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
1616
s.source_files = 'Classes/**/*'
1717
s.dependency 'Flutter'
1818
s.platform = :ios, '13.0'
19-
s.dependency "QonversionSandwich", "6.0.9"
19+
s.dependency "QonversionSandwich", "6.0.10"
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/qonversion_flutter.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ export 'src/dto/entitlement_source.dart';
77
export 'src/dto/entitlements_cache_lifetime.dart';
88
export 'src/dto/environment.dart';
99
export 'src/dto/launch_mode.dart';
10+
export 'src/dto/nocodes_events.dart';
1011
export 'src/dto/offerings.dart';
12+
export 'src/dto/presentation_config.dart';
1113
export 'src/dto/product.dart';
1214
export 'src/dto/product_type.dart';
1315
export 'src/dto/promotional_offer.dart';
@@ -42,10 +44,9 @@ export 'src/dto/store_product/product_offer_details.dart';
4244
export 'src/dto/store_product/product_price.dart';
4345
export 'src/dto/store_product/product_pricing_phase.dart';
4446
export 'src/dto/store_product/product_store_details.dart';
47+
export 'src/nocodes.dart';
48+
export 'src/nocodes_config.dart';
49+
export 'src/nocodes_config_builder.dart';
4550
export 'src/qonversion.dart';
4651
export 'src/qonversion_config.dart';
4752
export 'src/qonversion_config_builder.dart';
48-
export 'src/nocodes/nocodes.dart';
49-
export 'src/nocodes/nocodes_config.dart';
50-
export 'src/nocodes/nocodes_events.dart';
51-
export 'src/nocodes/presentation_config.dart';
File renamed without changes.
File renamed without changes.

lib/src/internal/constants.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ class Constants {
3333
static const kDiscountId = 'discountId';
3434
static const kPromoOffer = 'promoOffer';
3535
static const kConfig = 'config';
36+
static const kVersion = 'version';
37+
static const kSource = 'source';
3638

3739
// MethodChannel methods names
3840
static const mInitialize = 'initialize';
@@ -74,6 +76,7 @@ class Constants {
7476
static const mShowNoCodesScreen = 'showNoCodesScreen';
7577
static const mCloseNoCodes = 'closeNoCodes';
7678

77-
// Numeric constants
79+
// Other constants
7880
static const skuDetailsPriceRatio = 1000000;
81+
static const sdkSource = "flutter";
7982
}

0 commit comments

Comments
 (0)