File tree 3 files changed +12
-12
lines changed
3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ extension OptimizelyClient {
36
36
/// - Parameter attributes: A map of attribute names to current user attribute values.
37
37
/// - Returns: An OptimizelyUserContext associated with this OptimizelyClient
38
38
public func createUserContext( attributes: [ String : Any ] ? = nil ) -> OptimizelyUserContext ? {
39
- guard enableVuid, let vuid = self . vuid else {
39
+ guard enableVuid else {
40
40
logger. e ( " Vuid is not enabled or invalid VUID. User context not created. " )
41
41
return nil
42
42
}
Original file line number Diff line number Diff line change @@ -118,14 +118,14 @@ open class OptimizelyClient: NSObject {
118
118
self . decisionService = HandlerRegistryService . shared. injectDecisionService ( sdkKey: self . sdkKey)
119
119
self . notificationCenter = HandlerRegistryService . shared. injectNotificationCenter ( sdkKey: self . sdkKey)
120
120
121
- if let _vuid = self . vuidManager . vuid {
122
- try ? sendOdpEvent ( type: Constants . ODP. eventType,
123
- action: " client_initialized " ,
124
- identifiers: [
125
- Constants . ODP. keyForVuid: _vuid
126
- ] ,
127
- data: [ : ] )
128
- }
121
+
122
+ try ? sendOdpEvent ( type: Constants . ODP. eventType,
123
+ action: " client_initialized " ,
124
+ identifiers: [
125
+ Constants . ODP. keyForVuid: self . vuid
126
+ ] ,
127
+ data: [ : ] )
128
+
129
129
130
130
131
131
logger. d ( " SDK Version: \( version) " )
@@ -984,7 +984,7 @@ extension OptimizelyClient {
984
984
}
985
985
986
986
/// the device vuid (read only)
987
- public var vuid : String ? {
987
+ public var vuid : String {
988
988
return self . vuidManager. vuid
989
989
}
990
990
Original file line number Diff line number Diff line change @@ -52,12 +52,12 @@ public class VuidManager {
52
52
// MARK: - VUID Store
53
53
54
54
extension VuidManager {
55
- public var vuid : String ? {
55
+ public var vuid : String {
56
56
if self . enable {
57
57
return _vuid
58
58
} else {
59
59
logger. w ( " VUID is not enabled. " )
60
- return nil
60
+ return " "
61
61
}
62
62
}
63
63
You can’t perform that action at this time.
0 commit comments