Skip to content

Commit 347e872

Browse files
committed
Merge branch 'staging' of https://github.com/Countly/countly-sdk-flutter-bridge into staging-np
2 parents 1fcff17 + 4ff96ae commit 347e872

36 files changed

+534
-38
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 23.8.1
2+
* Added `enrollABOnRCDownload` config method to enroll users to AB tests when downloading Remote Config values
3+
* Fixed a bug where enabling consent requirements would enable consents for all features for Android
4+
* Added `testingDownloadExperimentInformation:` in remote config interface
5+
* Added `testingGetAllExperimentInfo:` in remote config interface
6+
* Updated underlying Android SDK version to 23.8.1
7+
* Updated underlying iOS SDK version to 23.8.2
8+
19
## 23.8.0
210
* ! Minor breaking change ! Manual view recording calls are now ignored if automatic view recording mode is enabled.
311

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ android {
3434
}
3535

3636
dependencies {
37-
implementation 'ly.count.android:sdk:23.8.0'
37+
implementation 'ly.count.android:sdk:23.8.1'
3838
}

android/src/main/java/ly/count/dart/countly_flutter/CountlyFlutterPlugin.java

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
import ly.count.android.sdk.Countly;
1515
import ly.count.android.sdk.CountlyConfig;
16+
import ly.count.android.sdk.ExperimentInformation;
1617
import ly.count.android.sdk.FeedbackRatingCallback;
1718
import ly.count.android.sdk.ModuleFeedback.*;
1819
import ly.count.android.sdk.DeviceIdType;
@@ -63,7 +64,7 @@
6364
*/
6465
public class CountlyFlutterPlugin implements MethodCallHandler, FlutterPlugin, ActivityAware, DefaultLifecycleObserver {
6566
private static final String TAG = "CountlyFlutterPlugin";
66-
private final String COUNTLY_FLUTTER_SDK_VERSION_STRING = "23.8.0";
67+
private final String COUNTLY_FLUTTER_SDK_VERSION_STRING = "23.8.1";
6768
private final String COUNTLY_FLUTTER_SDK_NAME = "dart-flutterb-android";
6869
private final String COUNTLY_FLUTTER_SDK_NAME_NO_PUSH = "dart-flutterbnp-android";
6970

@@ -968,7 +969,41 @@ public void callback(RequestResult downloadResult, String error, boolean fullVal
968969
});
969970

970971
result.success(null);
971-
} else if ("remoteConfigTestingEnrollIntoVariant".equals(call.method)) {
972+
}
973+
else if ("testingDownloadExperimentInformation".equals(call.method)) {
974+
int requestID = args.getInt(0);
975+
976+
log("testingDownloadExperimentInformation", LogLevel.WARNING);
977+
978+
Countly.sharedInstance().remoteConfig().testingDownloadExperimentInformation((rResult, error) -> {
979+
if (requestID == requestIDNoCallback) {
980+
return;
981+
}
982+
Map<String, Object> data = new HashMap<>();
983+
data.put("error", error);
984+
data.put("requestResult", resultResponder(rResult));
985+
data.put("id", requestID);
986+
methodChannel.invokeMethod("remoteConfigVariantCallback", data);
987+
});
988+
989+
result.success(null);
990+
}
991+
else if ("testingGetAllExperimentInfo".equals(call.method)) {
992+
Map<String, ExperimentInformation> experimentInfoMap = Countly.sharedInstance().remoteConfig().testingGetAllExperimentInfo();
993+
List<Map<String, Object>> experimentInfoArray = new ArrayList<>();
994+
for (Map.Entry<String, ExperimentInformation> entry : experimentInfoMap.entrySet()) {
995+
ExperimentInformation experimentInfo = entry.getValue();
996+
Map<String, Object> experimentInfoValue = new HashMap<>();
997+
experimentInfoValue.put("experimentID", experimentInfo.experimentName);
998+
experimentInfoValue.put("experimentName", experimentInfo.experimentName);
999+
experimentInfoValue.put("experimentDescription", experimentInfo.experimentDescription);
1000+
experimentInfoValue.put("currentVariant", experimentInfo.currentVariant);
1001+
experimentInfoValue.put("variants", experimentInfo.variants);
1002+
experimentInfoArray.add(experimentInfoValue);
1003+
}
1004+
result.success(experimentInfoArray);
1005+
}
1006+
else if ("remoteConfigTestingEnrollIntoVariant".equals(call.method)) {
9721007
int requestID = args.getInt(0);
9731008
String key = args.getString(1);
9741009
String variant = args.getString(2);
@@ -1530,8 +1565,12 @@ public void callback(String error) {
15301565
this.config.setGlobalViewSegmentation(toMap(globalViewSegmentation));
15311566
}
15321567

1533-
if (_config.has("enableAllConsents")) {
1568+
if (_config.has("enableAllConsents") && _config.getBoolean("enableAllConsents")) {
15341569
this.config.giveAllConsents();
15351570
}
1571+
1572+
if (_config.has("autoEnrollABOnDownload") && _config.getBoolean("autoEnrollABOnDownload")) {
1573+
this.config.enrollABOnRCDownload();
1574+
}
15361575
}
15371576
}

example-no-push/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ dependencies {
6060
testImplementation 'junit:junit:4.12'
6161
androidTestImplementation 'com.android.support.test:runner:1.0.2'
6262
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
63-
implementation 'ly.count.android:sdk:22.09.4'
63+
implementation 'ly.count.android:sdk:23.8.1'
6464
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
6565
}
6666

example/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ dependencies {
5959
testImplementation 'junit:junit:4.12'
6060
androidTestImplementation 'com.android.support.test:runner:1.0.2'
6161
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
62-
implementation 'ly.count.android:sdk:22.09.4'
62+
implementation 'ly.count.android:sdk:23.8.1'
6363
implementation 'com.google.firebase:firebase-messaging:20.2.1'
6464
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
6565
}

example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ subprojects {
2525
project.evaluationDependsOn(':app')
2626
}
2727

28-
task clean(type: Delete) {
28+
tasks.register("clean", Delete) {
2929
delete rootProject.buildDir
3030
}

example/ios/Flutter/Flutter.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
2-
# NOTE: This podspec is NOT to be published. It is only used as a local source!
3-
# This is a generated file; do not edit or check into version control.
2+
# This podspec is NOT to be published. It is only used as a local source!
3+
# This is a generated file; do not edit or check into version control.
44
#
55

66
Pod::Spec.new do |s|

example/ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
# platform :ios, '11.0'
2+
platform :ios, '11.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

example/ios/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PODS:
2-
- countly_flutter (23.6.0):
2+
- countly_flutter (23.8.1):
33
- Flutter
44
- Flutter (1.0.0)
55

@@ -14,9 +14,9 @@ EXTERNAL SOURCES:
1414
:path: Flutter
1515

1616
SPEC CHECKSUMS:
17-
countly_flutter: 4eeee607183664b871589250a0bd049cfd2697eb
17+
countly_flutter: f153e5547d4f3cdf24be11f6ed4df32c9a421fa3
1818
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
1919

20-
PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
20+
PODFILE CHECKSUM: 7368163408c647b7eb699d0d788ba6718e18fb8d
2121

2222
COCOAPODS: 1.12.1

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,11 @@
462462
"$(PROJECT_DIR)/Flutter",
463463
);
464464
INFOPLIST_FILE = Runner/Info.plist;
465-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
465+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
466+
LD_RUNPATH_SEARCH_PATHS = (
467+
"$(inherited)",
468+
"@executable_path/Frameworks",
469+
);
466470
LIBRARY_SEARCH_PATHS = (
467471
"$(inherited)",
468472
"$(PROJECT_DIR)/Flutter",
@@ -490,7 +494,11 @@
490494
GCC_C_LANGUAGE_STANDARD = gnu11;
491495
INFOPLIST_FILE = CountlyNSE/Info.plist;
492496
IPHONEOS_DEPLOYMENT_TARGET = 13.2;
493-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
497+
LD_RUNPATH_SEARCH_PATHS = (
498+
"$(inherited)",
499+
"@executable_path/Frameworks",
500+
"@executable_path/../../Frameworks",
501+
);
494502
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
495503
MTL_FAST_MATH = YES;
496504
PRODUCT_BUNDLE_IDENTIFIER = com.countly.demo.CountlyNSE;
@@ -514,7 +522,11 @@
514522
GCC_C_LANGUAGE_STANDARD = gnu11;
515523
INFOPLIST_FILE = CountlyNSE/Info.plist;
516524
IPHONEOS_DEPLOYMENT_TARGET = 13.2;
517-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
525+
LD_RUNPATH_SEARCH_PATHS = (
526+
"$(inherited)",
527+
"@executable_path/Frameworks",
528+
"@executable_path/../../Frameworks",
529+
);
518530
MTL_FAST_MATH = YES;
519531
PRODUCT_BUNDLE_IDENTIFIER = com.countly.demo.CountlyNSE;
520532
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -537,7 +549,11 @@
537549
GCC_C_LANGUAGE_STANDARD = gnu11;
538550
INFOPLIST_FILE = CountlyNSE/Info.plist;
539551
IPHONEOS_DEPLOYMENT_TARGET = 13.2;
540-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
552+
LD_RUNPATH_SEARCH_PATHS = (
553+
"$(inherited)",
554+
"@executable_path/Frameworks",
555+
"@executable_path/../../Frameworks",
556+
);
541557
MTL_FAST_MATH = YES;
542558
PRODUCT_BUNDLE_IDENTIFIER = com.countly.demo.CountlyNSE;
543559
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -666,7 +682,11 @@
666682
"$(PROJECT_DIR)/Flutter",
667683
);
668684
INFOPLIST_FILE = Runner/Info.plist;
669-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
685+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
686+
LD_RUNPATH_SEARCH_PATHS = (
687+
"$(inherited)",
688+
"@executable_path/Frameworks",
689+
);
670690
LIBRARY_SEARCH_PATHS = (
671691
"$(inherited)",
672692
"$(PROJECT_DIR)/Flutter",
@@ -696,7 +716,11 @@
696716
"$(PROJECT_DIR)/Flutter",
697717
);
698718
INFOPLIST_FILE = Runner/Info.plist;
699-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
719+
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
720+
LD_RUNPATH_SEARCH_PATHS = (
721+
"$(inherited)",
722+
"@executable_path/Frameworks",
723+
);
700724
LIBRARY_SEARCH_PATHS = (
701725
"$(inherited)",
702726
"$(PROJECT_DIR)/Flutter",

0 commit comments

Comments
 (0)