Skip to content

Commit 95d71c7

Browse files
wip: vuid event separated from odpmanager
1 parent 83ab331 commit 95d71c7

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

Sources/ODP/OdpManager.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ public class OdpManager {
6161
self.odpConfig = OdpConfig()
6262
self.segmentManager.odpConfig = odpConfig
6363
self.eventManager.odpConfig = odpConfig
64-
if let vuid = vuid, VuidManager.isVuid(vuid) {
65-
self.eventManager.sendInitializedEvent(vuid: vuid)
66-
}
64+
// if let vuid = vuid, VuidManager.isVuid(vuid) {
65+
// self.eventManager.sendInitializedEvent(vuid: vuid)
66+
// }
6767
}
6868

6969
func fetchQualifiedSegments(userId: String,

Sources/Optimizely/OptimizelyClient.swift

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ open class OptimizelyClient: NSObject {
101101
cacheTimeoutInSecs: sdkSettings.segmentsCacheTimeoutInSecs,
102102
timeoutForSegmentFetchInSecs: sdkSettings.timeoutForSegmentFetchInSecs,
103103
timeoutForEventDispatchInSecs: sdkSettings.timeoutForOdpEventInSecs)
104-
104+
105105
let userProfileService = userProfileService ?? DefaultUserProfileService()
106106
let logger = logger ?? DefaultLogger()
107107
type(of: logger).logLevel = defaultLogLevel ?? .info
@@ -118,7 +118,14 @@ open class OptimizelyClient: NSObject {
118118
self.datafileHandler = HandlerRegistryService.shared.injectDatafileHandler(sdkKey: self.sdkKey)
119119
self.decisionService = HandlerRegistryService.shared.injectDecisionService(sdkKey: self.sdkKey)
120120
self.notificationCenter = HandlerRegistryService.shared.injectNotificationCenter(sdkKey: self.sdkKey)
121-
121+
if VuidManager.shared.enable {
122+
try? sendOdpEvent(type: Constants.ODP.eventType,
123+
action: "client_initialized",
124+
identifiers: [
125+
Constants.ODP.keyForVuid: VuidManager.shared.vuid!
126+
],
127+
data: [:])
128+
}
122129
logger.d("SDK Version: \(version)")
123130
}
124131

0 commit comments

Comments
 (0)