Skip to content

Commit c1ff30e

Browse files
authored
Evaluation options, prereqs & imp disabled in iOS implementation (#151)
1 parent 968343f commit c1ff30e

File tree

14 files changed

+166
-114
lines changed

14 files changed

+166
-114
lines changed

splitio/example/ios/Podfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ target 'Runner' do
3232
use_modular_headers!
3333

3434
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35-
36-
pod 'Split', :git => 'https://github.com/splitio/ios-client.git', :branch => 'SDKS-9073_baseline' # TODO: remove; development only
3735
end
3836

3937
post_install do |installer|

splitio/example/ios/Podfile.lock

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,29 @@
11
PODS:
22
- Flutter (1.0.0)
3-
- Split (3.1.0)
4-
- splitio_ios (0.7.0):
3+
- Split (3.3.2)
4+
- splitio_ios (0.8.0):
55
- Flutter
6-
- Split
6+
- Split (~> 3.3.2)
77

88
DEPENDENCIES:
99
- Flutter (from `Flutter`)
10-
- Split (from `https://github.com/splitio/ios-client.git`, branch `SDKS-9073_baseline`)
1110
- splitio_ios (from `.symlinks/plugins/splitio_ios/ios`)
1211

12+
SPEC REPOS:
13+
trunk:
14+
- Split
15+
1316
EXTERNAL SOURCES:
1417
Flutter:
1518
:path: Flutter
16-
Split:
17-
:branch: SDKS-9073_baseline
18-
:git: https://github.com/splitio/ios-client.git
1919
splitio_ios:
2020
:path: ".symlinks/plugins/splitio_ios/ios"
2121

22-
CHECKOUT OPTIONS:
23-
Split:
24-
:commit: 708427ff99d24e2f2ae6e5a672ee23efebafba06
25-
:git: https://github.com/splitio/ios-client.git
26-
2722
SPEC CHECKSUMS:
2823
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
29-
Split: 17f15abcc74b39c3a8d670f59e787163626ad6b5
30-
splitio_ios: 00bf48283a9e3f9497a973d9b5cafc5d414dd427
24+
Split: 0d4962a6c15180e1857c1a3753e1ae9c91a6150b
25+
splitio_ios: 438ad21d0dfe467670f8b9508773b77b16a71d6b
3126

32-
PODFILE CHECKSUM: a52d9df387b5aca8aed91ec989839c51add619b2
27+
PODFILE CHECKSUM: 4e8f8b2be68aeea4c0d5beb6ff1e79fface1d048
3328

34-
COCOAPODS: 1.15.0
29+
COCOAPODS: 1.16.2

splitio/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
2930
shouldUseLaunchSchemeArgsEnv = "YES">
3031
<MacroExpansion>
3132
<BuildableReference
@@ -53,11 +54,13 @@
5354
buildConfiguration = "Debug"
5455
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5556
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
57+
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
5658
launchStyle = "0"
5759
useCustomWorkingDirectory = "NO"
5860
ignoresPersistentStateOnLaunch = "NO"
5961
debugDocumentVersioning = "YES"
6062
debugServiceExtension = "internal"
63+
enableGPUValidationMode = "1"
6164
allowLocationSimulation = "YES">
6265
<BuildableProductRunnable
6366
runnableDebuggingMode = "0">

splitio/example/ios/Runner/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import UIKit
22
import Flutter
33

4-
@UIApplicationMain
4+
@main
55
@objc class AppDelegate: FlutterAppDelegate {
66
override func application(
77
_ application: UIApplication,

splitio/example/pubspec.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,14 @@ packages:
173173
path: "../../splitio_android"
174174
relative: true
175175
source: path
176-
version: "0.3.0-rc.1"
176+
version: "1.0.0-rc.1"
177177
splitio_ios:
178178
dependency: transitive
179179
description:
180180
path: "../../splitio_ios"
181181
relative: true
182182
source: path
183-
version: "0.2.0"
183+
version: "1.0.0-rc.1"
184184
splitio_platform_interface:
185185
dependency: transitive
186186
description:

splitio_ios/example/ios/Podfile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,13 @@ target 'Runner' do
3232
use_modular_headers!
3333

3434
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35-
36-
pod 'Split', :git => 'https://github.com/splitio/ios-client.git', :branch => 'SDKS-9073_baseline' # TODO: remove; development only
3735
end
3836

3937
target 'SplitTests' do
4038
use_frameworks!
4139
use_modular_headers!
4240

4341
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
44-
45-
pod 'Split', :git => 'https://github.com/splitio/ios-client.git', :branch => 'SDKS-9073_baseline' # TODO: remove; development only
4642
end
4743

4844
post_install do |installer|

splitio_ios/example/ios/Podfile.lock

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,29 @@
11
PODS:
22
- Flutter (1.0.0)
3-
- Split (3.1.0)
4-
- splitio_ios (0.7.0):
3+
- Split (3.3.2)
4+
- splitio_ios (0.8.0):
55
- Flutter
6-
- Split
6+
- Split (~> 3.3.2)
77

88
DEPENDENCIES:
99
- Flutter (from `Flutter`)
10-
- Split (from `https://github.com/splitio/ios-client.git`, branch `SDKS-9073_baseline`)
1110
- splitio_ios (from `.symlinks/plugins/splitio_ios/ios`)
1211

12+
SPEC REPOS:
13+
trunk:
14+
- Split
15+
1316
EXTERNAL SOURCES:
1417
Flutter:
1518
:path: Flutter
16-
Split:
17-
:branch: SDKS-9073_baseline
18-
:git: https://github.com/splitio/ios-client.git
1919
splitio_ios:
2020
:path: ".symlinks/plugins/splitio_ios/ios"
2121

22-
CHECKOUT OPTIONS:
23-
Split:
24-
:commit: 708427ff99d24e2f2ae6e5a672ee23efebafba06
25-
:git: https://github.com/splitio/ios-client.git
26-
2722
SPEC CHECKSUMS:
2823
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
29-
Split: 17f15abcc74b39c3a8d670f59e787163626ad6b5
30-
splitio_ios: 00bf48283a9e3f9497a973d9b5cafc5d414dd427
24+
Split: 0d4962a6c15180e1857c1a3753e1ae9c91a6150b
25+
splitio_ios: 438ad21d0dfe467670f8b9508773b77b16a71d6b
3126

32-
PODFILE CHECKSUM: 3e7633332e3580ada5ac333ff9c0b05e8c0b7972
27+
PODFILE CHECKSUM: aed42fc5c94ade572556b7ed357c5c57f1bd83a2
3328

34-
COCOAPODS: 1.15.0
29+
COCOAPODS: 1.16.2

splitio_ios/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
2930
shouldUseLaunchSchemeArgsEnv = "YES">
3031
<MacroExpansion>
3132
<BuildableReference
@@ -53,11 +54,13 @@
5354
buildConfiguration = "Debug"
5455
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5556
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
57+
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
5658
launchStyle = "0"
5759
useCustomWorkingDirectory = "NO"
5860
ignoresPersistentStateOnLaunch = "NO"
5961
debugDocumentVersioning = "YES"
6062
debugServiceExtension = "internal"
63+
enableGPUValidationMode = "1"
6164
allowLocationSimulation = "YES">
6265
<BuildableProductRunnable
6366
runnableDebuggingMode = "0">

splitio_ios/example/ios/Runner/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import UIKit
22
import Flutter
33

4-
@UIApplicationMain
4+
@main
55
@objc class AppDelegate: FlutterAppDelegate {
66
override func application(
77
_ application: UIApplication,

splitio_ios/example/ios/SplitTests/ExtensionsTests.swift

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ class ExtensionsTests: XCTestCase {
1414
impression.label = "label"
1515
impression.treatment = "on"
1616
impression.time = 16161616
17+
impression.properties = "{\"myProp\": true}"
1718

1819
let impressionMap = impression.toMap()
19-
XCTAssert(impressionMap.count == 8)
20+
XCTAssert(impressionMap.count == 9)
2021
XCTAssert(NSDictionary(dictionary: impressionMap).isEqual(to: [
2122
"key": "matching-key",
2223
"bucketingKey": "bucketing-key",
@@ -25,7 +26,8 @@ class ExtensionsTests: XCTestCase {
2526
"appliedRule": "label",
2627
"treatment": "on",
2728
"split": "my-split",
28-
"time": 16161616]))
29+
"time": 16161616,
30+
"properties": "{\"myProp\": true}"]))
2931
}
3032

3133
func testSplitViewMapping() throws {
@@ -38,10 +40,21 @@ class ExtensionsTests: XCTestCase {
3840
splitView.configs = ["key": "value"]
3941
splitView.defaultTreatment = "off"
4042
splitView.sets = ["set1", "set2"]
43+
44+
let prerequisiteJSON = """
45+
{
46+
"n": "pre1",
47+
"t": ["on", "off"]
48+
}
49+
""".data(using: .utf8)!
50+
51+
let prerequisite = try JSONDecoder().decode(Prerequisite.self, from: prerequisiteJSON)
52+
splitView.prerequisites = [prerequisite]
4153
splitView.impressionsDisabled = true
4254

4355
let splitViewMap = SplitView.asMap(splitView: splitView)
44-
XCTAssert(splitViewMap.count == 9)
56+
57+
XCTAssert(splitViewMap.count == 10)
4558
XCTAssert(NSDictionary(dictionary: splitViewMap).isEqual(to: [
4659
"name": "my-split",
4760
"trafficType": "account",
@@ -51,6 +64,7 @@ class ExtensionsTests: XCTestCase {
5164
"configs": ["key": "value"],
5265
"defaultTreatment": "off",
5366
"sets": ["set1", "set2"],
54-
"impressionsDisabled": true]))
67+
"impressionsDisabled": true,
68+
"prerequisites": [prerequisite]]))
5569
}
5670
}

0 commit comments

Comments
 (0)