File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ let availableStaticServices = staticServices.map { (Type) -> ServiceDescriptor i
21
21
}
22
22
23
23
func ServiceFromRawValue( _ rawValue: [ String : Any ] ) -> Service ? {
24
- guard let serviceIdentifier = rawValue [ " statefulPluginIdentifier " ] as? String ,
24
+ guard let serviceIdentifier = rawValue [ " serviceIdentifier " ] as? String ,
25
25
let rawState = rawValue [ " state " ] as? Service . RawStateValue ,
26
26
let ServiceType = staticServicesByIdentifier [ serviceIdentifier]
27
27
else {
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ class ServicesManager {
100
100
}
101
101
102
102
private func serviceTypeFromRawValue( _ rawValue: Service . RawStateValue ) -> Service . Type ? {
103
- guard let identifier = rawValue [ " statefulPluginIdentifier " ] as? String else {
103
+ guard let identifier = rawValue [ " serviceIdentifier " ] as? String else {
104
104
return nil
105
105
}
106
106
@@ -400,3 +400,15 @@ extension ServicesManager: ServiceOnboardingDelegate {
400
400
extension ServicesManager {
401
401
var availableSupports : [ SupportUI ] { activeServices. compactMap { $0 as? SupportUI } }
402
402
}
403
+
404
+ // Service extension for rawValue
405
+ extension Service {
406
+ typealias RawValue = [ String : Any ]
407
+
408
+ var rawValue : RawValue {
409
+ return [
410
+ " serviceIdentifier " : pluginIdentifier,
411
+ " state " : rawState
412
+ ]
413
+ }
414
+ }
You can’t perform that action at this time.
0 commit comments