Skip to content
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: 1 addition & 1 deletion Split.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = 'Split'
s.module_name = 'Split'
s.version = '3.7.0-rc1'
s.version = '3.7.0'
s.summary = 'iOS SDK for Split'
s.description = <<-DESC
This SDK is designed to work with Split, the platform for controlled rollouts, serving features to your users via the Split feature flag to manage your complete customer experience.
Expand Down
6 changes: 3 additions & 3 deletions Split/Api/DefaultSplitClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ extension DefaultSplitClient {

// MARK: Events Listeners with Medatadata
@objc public func addEventListener(listener: SplitEventListener) {
if let l = listener.onSdkReady {
if let l = listener.onReady {
registerEvent(.sdkReady, action: l)
}

if let l = listener.onSdkReadyFromCache {
if let l = listener.onReadyFromCache {
registerEvent(.sdkReadyFromCache, action: l)
}

if let l = listener.onSdkUpdate {
if let l = listener.onUpdate {
registerEvent(.sdkUpdated, action: l)
}
}
Expand Down
6 changes: 3 additions & 3 deletions Split/Api/LocalhostSplitClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ public final class LocalhostSplitClient: NSObject, SplitClient {

// MARK: Events Listeners with Medatadata
@objc public func addEventListener(listener: SplitEventListener) {
if let l = listener.onSdkReady {
if let l = listener.onReady {
registerEvent(.sdkReady, action: l)
}

if let l = listener.onSdkReadyFromCache {
if let l = listener.onReadyFromCache {
registerEvent(.sdkReadyFromCache, action: l)
}

if let l = listener.onSdkUpdate {
if let l = listener.onUpdate {
registerEvent(.sdkUpdated, action: l)
}
}
Expand Down
12 changes: 6 additions & 6 deletions Split/Api/SplitClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import Foundation
public typealias SplitAction = () -> Void

@objc public protocol SplitEventListener: AnyObject, Sendable {
@objc(onSdkReady:)
optional func onSdkReady(_ metadata: SdkReadyMetadata)
@objc(onSdkReadyFromCache:)
optional func onSdkReadyFromCache(_ metadata: SdkReadyFromCacheMetadata)
@objc(onSdkUpdate:)
optional func onSdkUpdate(_ metadata: SdkUpdateMetadata)
@objc(onReady:)
optional func onReady(_ metadata: SdkReadyMetadata)
@objc(onReadyFromCache:)
optional func onReadyFromCache(_ metadata: SdkReadyFromCacheMetadata)
@objc(onUpdate:)
optional func onUpdate(_ metadata: SdkUpdateMetadata)
}

@objc public protocol SplitClient {
Expand Down
2 changes: 1 addition & 1 deletion Split/Common/Utils/Version.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation
class Version {
private static let kSdkPlatform: String = "ios"

private static let kVersion = "3.7.0-rc1"
private static let kVersion = "3.7.0"

static var semantic: String {
return kVersion
Expand Down
13 changes: 2 additions & 11 deletions Split/Events/SplitMetadata.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,8 @@ import Foundation
/// One or more user segments were updated.
///
@objc public enum SdkUpdateMetadataType: Int, Sendable {
case FLAGS_UPDATE
case SEGMENTS_UPDATE

public func toString() -> String {
switch self {
case .FLAGS_UPDATE:
return "FLAGS_UPDATE"
case .SEGMENTS_UPDATE:
return "SEGMENTS_UPDATE"
}
}
case flagsUpdate
case segmentsUpdate
}

/// Metadata for SDK update event.
Expand Down
6 changes: 3 additions & 3 deletions Split/FetcherEngine/Refresh/PeriodicSyncWorker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,13 @@ class PeriodicSplitsSyncWorker: BasePeriodicSyncWorker, @unchecked Sendable {
if result.success {

if !result.featureFlagsUpdated.isEmpty {
let event = SplitInternalEventWithMetadata(.splitsUpdated, metadata: SdkUpdateMetadata(type: .FLAGS_UPDATE, names: result.featureFlagsUpdated))
let event = SplitInternalEventWithMetadata(.splitsUpdated, metadata: SdkUpdateMetadata(type: .flagsUpdate, names: result.featureFlagsUpdated))
notifyUpdate(event)
return // Avoid duplicate notification
}

if result.rbsUpdated {
let event = SplitInternalEventWithMetadata(.splitsUpdated, metadata: SdkUpdateMetadata(type: .SEGMENTS_UPDATE, names: []))
let event = SplitInternalEventWithMetadata(.splitsUpdated, metadata: SdkUpdateMetadata(type: .segmentsUpdate, names: []))
notifyUpdate(event)
}
}
Expand Down Expand Up @@ -239,7 +239,7 @@ class PeriodicMySegmentsSyncWorker: BasePeriodicSyncWorker, @unchecked Sendable
if result.success {
if result.msUpdated || result.mlsUpdated {
// For now is not necessary specify which entity was updated
let event = SplitInternalEventWithMetadata(.mySegmentsUpdated, metadata: SdkUpdateMetadata(type: .SEGMENTS_UPDATE, names: []))
let event = SplitInternalEventWithMetadata(.mySegmentsUpdated, metadata: SdkUpdateMetadata(type: .segmentsUpdate, names: []))
notifyUpdate(event)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ class RetryableMySegmentsSyncWorker: BaseRetryableSyncWorker, @unchecked Sendabl
if result.success {
if !isSdkReadyTriggered() {
// Notifying both to trigger SDK Ready
var event = SplitInternalEventWithMetadata(.mySegmentsUpdated, metadata: SdkUpdateMetadata(type: .SEGMENTS_UPDATE, names: []))
var event = SplitInternalEventWithMetadata(.mySegmentsUpdated, metadata: SdkUpdateMetadata(type: .segmentsUpdate, names: []))
notifyUpdate(event)
event = SplitInternalEventWithMetadata(.myLargeSegmentsUpdated, metadata: SdkUpdateMetadata(type: .SEGMENTS_UPDATE, names: []))
event = SplitInternalEventWithMetadata(.myLargeSegmentsUpdated, metadata: SdkUpdateMetadata(type: .segmentsUpdate, names: []))
notifyUpdate(event)
} else if result.msUpdated || result.mlsUpdated {
// For now is not necessary specify which entity was updated
let event = SplitInternalEventWithMetadata(.mySegmentsUpdated, metadata: SdkUpdateMetadata(type: .SEGMENTS_UPDATE, names: []))
let event = SplitInternalEventWithMetadata(.mySegmentsUpdated, metadata: SdkUpdateMetadata(type: .segmentsUpdate, names: []))
notifyUpdate(event)
}
return true
Expand Down
8 changes: 4 additions & 4 deletions Split/FetcherEngine/Refresh/RetryableSyncWorker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,14 @@ class RetryableSplitsSyncWorker: BaseRetryableSyncWorker, @unchecked Sendable {
if isSdkReadyTriggered() || !result.featureFlagsUpdated.isEmpty || result.rbsUpdated {

if !result.featureFlagsUpdated.isEmpty {
let event = SplitInternalEventWithMetadata(.splitsUpdated, metadata: SdkUpdateMetadata(type: .FLAGS_UPDATE, names: result.featureFlagsUpdated), extra: lastUpdateTimestamp)
let event = SplitInternalEventWithMetadata(.splitsUpdated, metadata: SdkUpdateMetadata(type: .flagsUpdate, names: result.featureFlagsUpdated), extra: lastUpdateTimestamp)
notifyUpdate(event)
resetBackoffCounter()
return true // Avoid duplicating notifications, prioritizing flags over RBS updates
}

if result.rbsUpdated {
let event = SplitInternalEventWithMetadata(.splitsUpdated, metadata: SdkUpdateMetadata(type: .SEGMENTS_UPDATE, names: []), extra: lastUpdateTimestamp)
let event = SplitInternalEventWithMetadata(.splitsUpdated, metadata: SdkUpdateMetadata(type: .segmentsUpdate, names: []), extra: lastUpdateTimestamp)
notifyUpdate(event)
resetBackoffCounter()
return true
Expand Down Expand Up @@ -244,7 +244,7 @@ class RetryableSplitsUpdateWorker: BaseRetryableSyncWorker, @unchecked Sendable
if result.success {

if !result.featureFlagsUpdated.isEmpty {
let event = SplitInternalEventWithMetadata(.splitsUpdated, metadata: SdkUpdateMetadata(type: .FLAGS_UPDATE, names: result.featureFlagsUpdated))
let event = SplitInternalEventWithMetadata(.splitsUpdated, metadata: SdkUpdateMetadata(type: .flagsUpdate, names: result.featureFlagsUpdated))
notifyUpdate(event)

// Avoids double update notification, prioritizing flags notification over RBS
Expand All @@ -253,7 +253,7 @@ class RetryableSplitsUpdateWorker: BaseRetryableSyncWorker, @unchecked Sendable
}

if result.rbsUpdated {
let event = SplitInternalEventWithMetadata(.splitsUpdated, metadata: SdkUpdateMetadata(type: .SEGMENTS_UPDATE, names: []))
let event = SplitInternalEventWithMetadata(.splitsUpdated, metadata: SdkUpdateMetadata(type: .segmentsUpdate, names: []))
notifyUpdate(event)
}

Expand Down
4 changes: 2 additions & 2 deletions Split/Localhost/LocalhostClientManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ class LocalhostClientManager: SplitClientManager, @unchecked Sendable {
clients.setValue(newGroup, forKey: key.matchingKey)
eventsManagerCoordinator.add(newEventsManager, forKey: key)

var event = SplitInternalEventWithMetadata(.mySegmentsUpdated, metadata: SdkUpdateMetadata(type: .SEGMENTS_UPDATE, names: []))
var event = SplitInternalEventWithMetadata(.mySegmentsUpdated, metadata: SdkUpdateMetadata(type: .segmentsUpdate, names: []))
newEventsManager.notifyInternalEvent(event)
event = SplitInternalEventWithMetadata(.myLargeSegmentsUpdated, metadata: SdkUpdateMetadata(type: .SEGMENTS_UPDATE, names: []))
event = SplitInternalEventWithMetadata(.myLargeSegmentsUpdated, metadata: SdkUpdateMetadata(type: .segmentsUpdate, names: []))
newEventsManager.notifyInternalEvent(event)

return newClient
Expand Down
2 changes: 1 addition & 1 deletion Split/Localhost/LocalhostSynchronizer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class LocalhostSynchronizer: FeatureFlagsSynchronizer, @unchecked Sendable {
// Update will remove all records before insert new ones
_ = self.featureFlagsStorage.update(splitChange: change)

let eventMetadata = SdkUpdateMetadata(type: .FLAGS_UPDATE, names: values.compactMap(\.name))
let eventMetadata = SdkUpdateMetadata(type: .flagsUpdate, names: values.compactMap(\.name))
let event = SplitInternalEventWithMetadata(.splitsUpdated, metadata: eventMetadata)
self.eventsManager.notifyInternalEvent(event)
}
Expand Down
4 changes: 2 additions & 2 deletions Split/Network/Sync/ByKeyFacade.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ class DefaultByKeyFacade: ByKeyFacade, @unchecked Sendable {

func notifyMySegmentsUpdated(forKey key: String) {
doInAll(forMatchingKey: key) { group in
let event = SplitInternalEventWithMetadata(.mySegmentsUpdated, metadata: SdkUpdateMetadata(type: .SEGMENTS_UPDATE, names: []))
let event = SplitInternalEventWithMetadata(.mySegmentsUpdated, metadata: SdkUpdateMetadata(type: .segmentsUpdate, names: []))
group.eventsManager.notifyInternalEvent(event)
}
}

func notifyMyLargeSegmentsUpdated(forKey key: String) {
doInAll(forMatchingKey: key) { group in
let event = SplitInternalEventWithMetadata(.mySegmentsUpdated, metadata: SdkUpdateMetadata(type: .SEGMENTS_UPDATE, names: []))
let event = SplitInternalEventWithMetadata(.mySegmentsUpdated, metadata: SdkUpdateMetadata(type: .segmentsUpdate, names: []))
group.eventsManager.notifyInternalEvent(event)
}
}
Expand Down
4 changes: 2 additions & 2 deletions Split/Network/Sync/FeatureFlagsSynchronizer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class DefaultFeatureFlagsSynchronizer: FeatureFlagsSynchronizer, @unchecked Send

func notifyUpdated(flags: [String]) {
// Build event
let eventMetadata = SdkUpdateMetadata(type: .FLAGS_UPDATE, names: flags)
let eventMetadata = SdkUpdateMetadata(type: .flagsUpdate, names: flags)
let event = SplitInternalEventWithMetadata(.splitsUpdated, metadata: eventMetadata)

// Send
Expand All @@ -178,7 +178,7 @@ class DefaultFeatureFlagsSynchronizer: FeatureFlagsSynchronizer, @unchecked Send

func notifyUpdated(segments: [String]) {
// Build event
let eventMetadata = SdkUpdateMetadata(type: .SEGMENTS_UPDATE, names: segments)
let eventMetadata = SdkUpdateMetadata(type: .segmentsUpdate, names: segments)
let event = SplitInternalEventWithMetadata(.splitsUpdated, metadata: eventMetadata)

// Send
Expand Down
6 changes: 3 additions & 3 deletions SplitTests/Init/SplitClientTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
client.addEventListener(listener: listener)

let types = Set(eventsManager.registeredEvents.keys.map { $0.type })
XCTAssertEqual(types, Set([.sdkReady]))

Check failure on line 113 in SplitTests/Init/SplitClientTests.swift

View workflow job for this annotation

GitHub Actions / test (SplitiOSIntegration, SplitTestsSwift5) / test

testAddEventListenerRegistersOnlyImplementedCallbacks, XCTAssertEqual failed: ("[]") is not equal to ("[Split.SplitEvent]")

Check failure on line 113 in SplitTests/Init/SplitClientTests.swift

View workflow job for this annotation

GitHub Actions / test (SplitiOSIntegration, SplitTestsSwift5) / test

testAddEventListenerRegistersOnlyImplementedCallbacks, XCTAssertEqual failed: ("[]") is not equal to ("[Split.SplitEvent]")

Check failure on line 113 in SplitTests/Init/SplitClientTests.swift

View workflow job for this annotation

GitHub Actions / test (SplitiOSIntegration, SplitTestsSwift5) / test

testAddEventListenerRegistersOnlyImplementedCallbacks, XCTAssertEqual failed: ("[]") is not equal to ("[Split.SplitEvent]")

Check failure on line 113 in SplitTests/Init/SplitClientTests.swift

View workflow job for this annotation

GitHub Actions / test (SplitiOSIntegration, SplitTestsSwift5) / test

testAddEventListenerRegistersOnlyImplementedCallbacks, XCTAssertEqual failed: ("[]") is not equal to ("[Split.SplitEvent]")

Check failure on line 113 in SplitTests/Init/SplitClientTests.swift

View workflow job for this annotation

GitHub Actions / test (SplitiOSIntegration, SplitTestsSwift6) / test

testAddEventListenerRegistersOnlyImplementedCallbacks, XCTAssertEqual failed: ("[]") is not equal to ("[Split.SplitEvent]")

Check failure on line 113 in SplitTests/Init/SplitClientTests.swift

View workflow job for this annotation

GitHub Actions / test (SplitiOSIntegration, SplitTestsSwift6) / test

testAddEventListenerRegistersOnlyImplementedCallbacks, XCTAssertEqual failed: ("[]") is not equal to ("[Split.SplitEvent]")

Check failure on line 113 in SplitTests/Init/SplitClientTests.swift

View workflow job for this annotation

GitHub Actions / test (SplitiOSIntegration, SplitTestsSwift6) / test

testAddEventListenerRegistersOnlyImplementedCallbacks, XCTAssertEqual failed: ("[]") is not equal to ("[Split.SplitEvent]")

Check failure on line 113 in SplitTests/Init/SplitClientTests.swift

View workflow job for this annotation

GitHub Actions / test (SplitiOSIntegration, SplitTestsSwift6) / test

testAddEventListenerRegistersOnlyImplementedCallbacks, XCTAssertEqual failed: ("[]") is not equal to ("[Split.SplitEvent]")

Check failure on line 113 in SplitTests/Init/SplitClientTests.swift

View workflow job for this annotation

GitHub Actions / test (SplitiOSIntegration, SplitTestsSwift6) / test

testAddEventListenerRegistersOnlyImplementedCallbacks, XCTAssertEqual failed: ("[]") is not equal to ("[Split.SplitEvent]")
}

func testAddEventListenerCallsMultipleListenersOnSdkReady() {
Expand Down Expand Up @@ -138,7 +138,7 @@
localEventsManager.notifyInternalEvent(.myLargeSegmentsUpdated)
localEventsManager.notifyInternalEvent(.splitsUpdated)

wait(for: [exp1, exp2], timeout: 2.0)

Check failure on line 141 in SplitTests/Init/SplitClientTests.swift

View workflow job for this annotation

GitHub Actions / test (SplitiOSIntegration, SplitTestsSwift5) / test

testAddEventListenerCallsMultipleListenersOnSdkReady, Asynchronous wait failed: Exceeded timeout of 2 seconds, with unfulfilled expectations: "listener 1 called", "listener 2 called".

Check failure on line 141 in SplitTests/Init/SplitClientTests.swift

View workflow job for this annotation

GitHub Actions / test (SplitiOSIntegration, SplitTestsSwift5) / test

testAddEventListenerCallsMultipleListenersOnSdkReady, Asynchronous wait failed: Exceeded timeout of 2 seconds, with unfulfilled expectations: "listener 1 called", "listener 2 called".

Check failure on line 141 in SplitTests/Init/SplitClientTests.swift

View workflow job for this annotation

GitHub Actions / test (SplitiOSIntegration, SplitTestsSwift5) / test

testAddEventListenerCallsMultipleListenersOnSdkReady, Asynchronous wait failed: Exceeded timeout of 2 seconds, with unfulfilled expectations: "listener 1 called", "listener 2 called".

Check failure on line 141 in SplitTests/Init/SplitClientTests.swift

View workflow job for this annotation

GitHub Actions / test (SplitiOSIntegration, SplitTestsSwift5) / test

testAddEventListenerCallsMultipleListenersOnSdkReady, Asynchronous wait failed: Exceeded timeout of 2 seconds, with unfulfilled expectations: "listener 1 called", "listener 2 called".

Check failure on line 141 in SplitTests/Init/SplitClientTests.swift

View workflow job for this annotation

GitHub Actions / test (SplitiOSIntegration, SplitTestsSwift6) / test

testAddEventListenerCallsMultipleListenersOnSdkReady, Asynchronous wait failed: Exceeded timeout of 2 seconds, with unfulfilled expectations: "listener 1 called", "listener 2 called".

Check failure on line 141 in SplitTests/Init/SplitClientTests.swift

View workflow job for this annotation

GitHub Actions / test (SplitiOSIntegration, SplitTestsSwift6) / test

testAddEventListenerCallsMultipleListenersOnSdkReady, Asynchronous wait failed: Exceeded timeout of 2 seconds, with unfulfilled expectations: "listener 1 called", "listener 2 called".

Check failure on line 141 in SplitTests/Init/SplitClientTests.swift

View workflow job for this annotation

GitHub Actions / test (SplitiOSIntegration, SplitTestsSwift6) / test

testAddEventListenerCallsMultipleListenersOnSdkReady, Asynchronous wait failed: Exceeded timeout of 2 seconds, with unfulfilled expectations: "listener 1 called", "listener 2 called".

Check failure on line 141 in SplitTests/Init/SplitClientTests.swift

View workflow job for this annotation

GitHub Actions / test (SplitiOSIntegration, SplitTestsSwift6) / test

testAddEventListenerCallsMultipleListenersOnSdkReady, Asynchronous wait failed: Exceeded timeout of 2 seconds, with unfulfilled expectations: "listener 1 called", "listener 2 called".

Check failure on line 141 in SplitTests/Init/SplitClientTests.swift

View workflow job for this annotation

GitHub Actions / test (SplitiOSIntegration, SplitTestsSwift6) / test

testAddEventListenerCallsMultipleListenersOnSdkReady, Asynchronous wait failed: Exceeded timeout of 2 seconds, with unfulfilled expectations: "listener 1 called", "listener 2 called".
}

func testGetTreatmentWithEvaluationOptions() {
Expand Down Expand Up @@ -332,11 +332,11 @@
}

final class SplitEventListenerAllEvents: NSObject, SplitEventListener {
@objc func onSdkReady(_ metadata: SdkReadyMetadata) {}
@objc func onReady(_ metadata: SdkReadyMetadata) {}

@objc func onSdkReadyFromCache(_ metadata: SdkReadyFromCacheMetadata) {}
@objc func onReadyFromCache(_ metadata: SdkReadyFromCacheMetadata) {}

@objc func onSdkUpdate(_ metadata: SdkUpdateMetadata) {}
@objc func onUpdate(_ metadata: SdkUpdateMetadata) {}
}

final class SplitEventListenerReadyOnly: NSObject, SplitEventListener {
Expand Down
10 changes: 5 additions & 5 deletions SplitTests/MetadataEventsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@

wait(for: [sdkReadyExpectation, metadataReady], timeout: 5)

XCTAssertEqual(listener.readyMetadata?.isInitialCacheLoad, false)

Check failure on line 130 in SplitTests/MetadataEventsTests.swift

View workflow job for this annotation

GitHub Actions / test (SplitiOSIntegration, SplitTestsSwift5) / test

testReadyMetadataReRun, XCTAssertEqual failed: ("Optional(true)") is not equal to ("Optional(false)")
XCTAssertNotNil(listener.readyMetadata?.lastUpdateTimestamp)

Check failure on line 131 in SplitTests/MetadataEventsTests.swift

View workflow job for this annotation

GitHub Actions / test (SplitiOSIntegration, SplitTestsSwift5) / test

testReadyMetadataReRun, XCTAssertNotNil failed
}

func testUpdateMetadataStreaming() {
Expand Down Expand Up @@ -184,7 +184,7 @@
wait(for: [sdkUpdate, exp], timeout: 5)

// MARK: Key part 2
XCTAssertEqual(listener.updateMetadata?.type, .FLAGS_UPDATE)
XCTAssertEqual(listener.updateMetadata?.type, .flagsUpdate)
XCTAssertEqual(listener.updateMetadata?.names, ["workm"])

let semaphore = DispatchSemaphore(value: 0)
Expand Down Expand Up @@ -240,7 +240,7 @@
wait(for: [sdkReady, sdkUpdate, exp], timeout: 30)

// MARK: Key part 3
XCTAssertEqual(listener.updateMetadata?.type, .FLAGS_UPDATE)
XCTAssertEqual(listener.updateMetadata?.type, .flagsUpdate)
XCTAssertEqual(listener.updateMetadata?.names, ["test_feature"])

let semaphore = DispatchSemaphore(value: 0)
Expand Down Expand Up @@ -274,19 +274,19 @@
self.listenerNumber = listenerNumber!
}

func onSdkReady(_ metadata: SdkReadyMetadata) {
func onReady(_ metadata: SdkReadyMetadata) {
readyMetadata = metadata
readyExp.fulfill()
print("Ready expectation \(listenerNumber) - \(String(describing: Unmanaged.passUnretained(readyExp).toOpaque()))")
}

func onSdkReadyFromCache(_ metadata: SdkReadyFromCacheMetadata) {
func onReadyFromCache(_ metadata: SdkReadyFromCacheMetadata) {
fromCacheMetadata = metadata
fromCacheExp.fulfill()
print("Ready from Cache expectation \(listenerNumber) - \(String(describing: Unmanaged.passUnretained(readyExp).toOpaque()))")
}

func onSdkUpdate(_ metadata: SdkUpdateMetadata) {
func onUpdate(_ metadata: SdkUpdateMetadata) {
updateMetadata = metadata
updateExp.fulfill()
print("Update expectation \(listenerNumber) - \(String(describing: Unmanaged.passUnretained(readyExp).toOpaque()))")
Expand Down
2 changes: 1 addition & 1 deletion SplitTests/SplitEventsManagerTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ class SplitEventsManagerTest: XCTestCase, @unchecked Sendable {
func testSdkUpdateWithMetadata() {
let taskExp = XCTestExpectation()

let type: SdkUpdateMetadataType = .FLAGS_UPDATE
let type: SdkUpdateMetadataType = .flagsUpdate
let names = ["Flag1", "FLAG2"]

let metadata = SdkUpdateMetadata(type: type, names: names)
Expand Down
Loading