File tree Expand file tree Collapse file tree 2 files changed +10
-20
lines changed Expand file tree Collapse file tree 2 files changed +10
-20
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,13 @@ public class OdpManager {
81
81
completionHandler: completionHandler)
82
82
}
83
83
84
+ func sendInitializedEvent( ) {
85
+ guard let vuid = self . vuid else {
86
+ return
87
+ }
88
+ eventManager? . sendInitializedEvent ( vuid: vuid)
89
+ }
90
+
84
91
func identifyUser( userId: String ) {
85
92
guard enabled else {
86
93
logger. d ( " ODP identify event is not dispatched (ODP disabled). " )
@@ -120,7 +127,7 @@ public class OdpManager {
120
127
121
128
var identifiersUpdated = identifiers
122
129
123
- if identifiers [ Constants . ODP. keyForVuid] == nil , let _vuid = vuid, VuidManager . isVuid ( _vuid ) {
130
+ if identifiers [ Constants . ODP. keyForVuid] == nil , let _vuid = vuid {
124
131
identifiersUpdated [ Constants . ODP. keyForVuid] = _vuid
125
132
}
126
133
Original file line number Diff line number Diff line change @@ -121,17 +121,9 @@ open class OptimizelyClient: NSObject {
121
121
self . datafileHandler = HandlerRegistryService . shared. injectDatafileHandler ( sdkKey: self . sdkKey)
122
122
self . decisionService = HandlerRegistryService . shared. injectDecisionService ( sdkKey: self . sdkKey)
123
123
self . notificationCenter = HandlerRegistryService . shared. injectNotificationCenter ( sdkKey: self . sdkKey)
124
-
125
- if let _vuid = vuid {
126
- try ? sendOdpEvent ( type: Constants . ODP. eventType,
127
- action: " client_initialized " ,
128
- identifiers: [
129
- Constants . ODP. keyForVuid: _vuid
130
- ] ,
131
- data: [ : ] )
132
-
124
+ if vuid != nil {
125
+ self . odpManager. sendInitialEvent ( )
133
126
}
134
-
135
127
logger. d ( " SDK Version: \( version) " )
136
128
}
137
129
@@ -987,15 +979,6 @@ extension OptimizelyClient {
987
979
data: data)
988
980
}
989
981
990
- // /// the device vuid (read only)
991
- // public var vuid: String? {
992
- // return self.vuidManager.vuid
993
- // }
994
- //
995
- // public var enableVuid: Bool {
996
- // return self.vuidManager.enable
997
- // }
998
- //
999
982
func identifyUserToOdp( userId: String ) {
1000
983
odpManager. identifyUser ( userId: userId)
1001
984
}
You can’t perform that action at this time.
0 commit comments