Skip to content

Evaluation options, prereqs & imp disabled in iOS implementation #151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Aug 14, 2025
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
2 changes: 0 additions & 2 deletions splitio/example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ target 'Runner' do
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))

pod 'Split', :git => 'https://github.com/splitio/ios-client.git', :branch => 'SDKS-9073_baseline' # TODO: remove; development only
end

post_install do |installer|
Expand Down
27 changes: 11 additions & 16 deletions splitio/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,34 +1,29 @@
PODS:
- Flutter (1.0.0)
- Split (3.1.0)
- splitio_ios (0.7.0):
- Split (3.3.2)
- splitio_ios (0.8.0):
- Flutter
- Split
- Split (~> 3.3.2)

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

SPEC REPOS:
trunk:
- Split

EXTERNAL SOURCES:
Flutter:
:path: Flutter
Split:
:branch: SDKS-9073_baseline
:git: https://github.com/splitio/ios-client.git
splitio_ios:
:path: ".symlinks/plugins/splitio_ios/ios"

CHECKOUT OPTIONS:
Split:
:commit: 708427ff99d24e2f2ae6e5a672ee23efebafba06
:git: https://github.com/splitio/ios-client.git

SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
Split: 17f15abcc74b39c3a8d670f59e787163626ad6b5
splitio_ios: 00bf48283a9e3f9497a973d9b5cafc5d414dd427
Split: 0d4962a6c15180e1857c1a3753e1ae9c91a6150b
splitio_ios: 438ad21d0dfe467670f8b9508773b77b16a71d6b

PODFILE CHECKSUM: a52d9df387b5aca8aed91ec989839c51add619b2
PODFILE CHECKSUM: 4e8f8b2be68aeea4c0d5beb6ff1e79fface1d048

COCOAPODS: 1.15.0
COCOAPODS: 1.16.2
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
Expand Down Expand Up @@ -53,11 +54,13 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
2 changes: 1 addition & 1 deletion splitio/example/ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import UIKit
import Flutter

@UIApplicationMain
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
Expand Down
4 changes: 2 additions & 2 deletions splitio/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,14 @@ packages:
path: "../../splitio_android"
relative: true
source: path
version: "0.3.0-rc.1"
version: "1.0.0-rc.1"
splitio_ios:
dependency: transitive
description:
path: "../../splitio_ios"
relative: true
source: path
version: "0.2.0"
version: "1.0.0-rc.1"
splitio_platform_interface:
dependency: transitive
description:
Expand Down
4 changes: 0 additions & 4 deletions splitio_ios/example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,13 @@ target 'Runner' do
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))

pod 'Split', :git => 'https://github.com/splitio/ios-client.git', :branch => 'SDKS-9073_baseline' # TODO: remove; development only
end

target 'SplitTests' do
use_frameworks!
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))

pod 'Split', :git => 'https://github.com/splitio/ios-client.git', :branch => 'SDKS-9073_baseline' # TODO: remove; development only
end

post_install do |installer|
Expand Down
27 changes: 11 additions & 16 deletions splitio_ios/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,34 +1,29 @@
PODS:
- Flutter (1.0.0)
- Split (3.1.0)
- splitio_ios (0.7.0):
- Split (3.3.2)
- splitio_ios (0.8.0):
- Flutter
- Split
- Split (~> 3.3.2)

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

SPEC REPOS:
trunk:
- Split

EXTERNAL SOURCES:
Flutter:
:path: Flutter
Split:
:branch: SDKS-9073_baseline
:git: https://github.com/splitio/ios-client.git
splitio_ios:
:path: ".symlinks/plugins/splitio_ios/ios"

CHECKOUT OPTIONS:
Split:
:commit: 708427ff99d24e2f2ae6e5a672ee23efebafba06
:git: https://github.com/splitio/ios-client.git

SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
Split: 17f15abcc74b39c3a8d670f59e787163626ad6b5
splitio_ios: 00bf48283a9e3f9497a973d9b5cafc5d414dd427
Split: 0d4962a6c15180e1857c1a3753e1ae9c91a6150b
splitio_ios: 438ad21d0dfe467670f8b9508773b77b16a71d6b

PODFILE CHECKSUM: 3e7633332e3580ada5ac333ff9c0b05e8c0b7972
PODFILE CHECKSUM: aed42fc5c94ade572556b7ed357c5c57f1bd83a2

COCOAPODS: 1.15.0
COCOAPODS: 1.16.2
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
Expand Down Expand Up @@ -53,11 +54,13 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
Expand Down
2 changes: 1 addition & 1 deletion splitio_ios/example/ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import UIKit
import Flutter

@UIApplicationMain
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
Expand Down
22 changes: 18 additions & 4 deletions splitio_ios/example/ios/SplitTests/ExtensionsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ class ExtensionsTests: XCTestCase {
impression.label = "label"
impression.treatment = "on"
impression.time = 16161616
impression.properties = "{\"myProp\": true}"

let impressionMap = impression.toMap()
XCTAssert(impressionMap.count == 8)
XCTAssert(impressionMap.count == 9)
XCTAssert(NSDictionary(dictionary: impressionMap).isEqual(to: [
"key": "matching-key",
"bucketingKey": "bucketing-key",
Expand All @@ -25,7 +26,8 @@ class ExtensionsTests: XCTestCase {
"appliedRule": "label",
"treatment": "on",
"split": "my-split",
"time": 16161616]))
"time": 16161616,
"properties": "{\"myProp\": true}"]))
}

func testSplitViewMapping() throws {
Expand All @@ -38,10 +40,21 @@ class ExtensionsTests: XCTestCase {
splitView.configs = ["key": "value"]
splitView.defaultTreatment = "off"
splitView.sets = ["set1", "set2"]

let prerequisiteJSON = """
{
"n": "pre1",
"t": ["on", "off"]
}
""".data(using: .utf8)!

let prerequisite = try JSONDecoder().decode(Prerequisite.self, from: prerequisiteJSON)
splitView.prerequisites = [prerequisite]
splitView.impressionsDisabled = true

let splitViewMap = SplitView.asMap(splitView: splitView)
XCTAssert(splitViewMap.count == 9)

XCTAssert(splitViewMap.count == 10)
XCTAssert(NSDictionary(dictionary: splitViewMap).isEqual(to: [
"name": "my-split",
"trafficType": "account",
Expand All @@ -51,6 +64,7 @@ class ExtensionsTests: XCTestCase {
"configs": ["key": "value"],
"defaultTreatment": "off",
"sets": ["set1", "set2"],
"impressionsDisabled": true]))
"impressionsDisabled": true,
"prerequisites": [prerequisite]]))
}
}
Loading
Loading