Skip to content

Commit 4b3c53c

Browse files
[FSSDK-11465] chore: add netspring support (#80)
1 parent 48c1b5c commit 4b3c53c

File tree

5 files changed

+32
-9
lines changed

5 files changed

+32
-9
lines changed

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ dependencies {
7474
implementation 'org.slf4j:slf4j-api:2.0.7'
7575

7676
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10"
77-
implementation "com.optimizely.ab:android-sdk:5.0.0"
77+
implementation "com.optimizely.ab:android-sdk:5.0.1"
7878
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.4'
7979
implementation ('com.google.guava:guava:19.0') {
8080
exclude group:'com.google.guava', module:'listenablefuture'

ios/optimizely_flutter_sdk.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Pod::Spec.new do |s|
1313
s.source = { :path => '.' }
1414
s.source_files = 'Classes/**/*'
1515
s.dependency 'Flutter'
16-
s.dependency 'OptimizelySwiftSDK', '5.0.0'
16+
s.dependency 'OptimizelySwiftSDK', '5.1.1'
1717
s.platform = :ios, '10.0'
1818
# Flutter.framework does not contain a i386 slice.
1919
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }

lib/src/optimizely_client_wrapper.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,6 @@ class OptimizelyClientWrapper {
371371

372372
if (checkCallBackExist(sdkKey, callback)) {
373373
// ignore: avoid_print
374-
print("callback already exists.");
375374
return -1;
376375
}
377376

@@ -417,7 +416,6 @@ class OptimizelyClientWrapper {
417416

418417
if (checkCallBackExist(sdkKey, callback)) {
419418
// ignore: avoid_print
420-
print("callback already exists.");
421419
return -1;
422420
}
423421

@@ -440,7 +438,6 @@ class OptimizelyClientWrapper {
440438

441439
if (checkCallBackExist(sdkKey, callback)) {
442440
// ignore: avoid_print
443-
print("callback already exists.");
444441
return -1;
445442
}
446443

@@ -464,7 +461,6 @@ class OptimizelyClientWrapper {
464461

465462
if (checkCallBackExist(sdkKey, callback)) {
466463
// ignore: avoid_print
467-
print("callback already exists.");
468464
return -1;
469465
}
470466

lib/src/utils/constants.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ class Constants {
6262
static const String userContextId = "userContextId";
6363
static const String userContext = "userContext";
6464
static const String experiment = "experiment";
65+
static const String experimentId = "experimentId";
6566
static const String variation = "variation";
67+
static const String variationId = "variationId";
6668
static const String userId = "userId";
6769
static const String vuid = "vuid";
6870
static const String experimentKey = "experimentKey";

test/test_utils.dart

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,14 @@ class TestUtils {
8989
handler(MethodCall(Constants.decisionCallBackListener, {
9090
Constants.id: id,
9191
Constants.sdkKey: sdkKey,
92-
Constants.payload: {Constants.type: "$id", Constants.userId: "test"}
92+
Constants.payload: <String, Object>{
93+
Constants.type: "$id",
94+
Constants.userId: "test",
95+
Constants.decisionInfo: const {
96+
Constants.experimentId: "experiment_12345",
97+
Constants.variationId: "variation_12345",
98+
},
99+
}
93100
}));
94101
}
95102

@@ -129,7 +136,15 @@ class TestUtils {
129136
Constants.eventKey: "$id",
130137
Constants.userId: "test",
131138
Constants.attributes: {"test": id},
132-
Constants.eventTags: {"testTag": id}
139+
Constants.eventTags: {
140+
"testTag": id,
141+
"nestedTag": {
142+
"string_key": "stringValue",
143+
"int_key": 123,
144+
"double_key": 123.456,
145+
"bool_key": true
146+
}
147+
}
133148
};
134149
handler(MethodCall(Constants.trackCallBackListener, {
135150
Constants.id: id,
@@ -145,6 +160,12 @@ class TestUtils {
145160
Constants.attributes: {"test": id},
146161
Constants.eventTags: {
147162
"testTag": id,
163+
"nestedTag": {
164+
"string_key": "stringValue",
165+
"int_key": 123,
166+
"double_key": 123.456,
167+
"bool_key": true
168+
},
148169
"client_name": clientName,
149170
"client_version": sdkVersion
150171
}
@@ -179,7 +200,11 @@ class TestUtils {
179200
static bool testDecisionNotificationPayload(
180201
List notifications, int id, int actualID) {
181202
if (notifications[id].type != "$actualID" ||
182-
notifications[id].userId != "test") {
203+
notifications[id].userId != "test" ||
204+
notifications[id].decisionInfo[Constants.experimentId] !=
205+
"experiment_12345" ||
206+
notifications[id].decisionInfo[Constants.variationId] !=
207+
"variation_12345") {
183208
return false;
184209
}
185210
return true;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy