From 337599d64dd1580aff6700ea00ca82566bc739b2 Mon Sep 17 00:00:00 2001 From: Bill Gestrich Date: Sat, 20 Mar 2021 08:56:32 -0400 Subject: [PATCH] Store device token to LoopSettings --- LoopCore/LoopSettings.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/LoopCore/LoopSettings.swift b/LoopCore/LoopSettings.swift index f8e8c75aae..159b3b98e9 100644 --- a/LoopCore/LoopSettings.swift +++ b/LoopCore/LoopSettings.swift @@ -295,6 +295,8 @@ extension LoopSettings: RawRepresentable { let dosingStrategy = DosingStrategy(rawValue: rawDosingStrategy) { self.dosingStrategy = dosingStrategy } + + self.deviceToken = rawValue["deviceToken"] as? Data } public var rawValue: RawValue { @@ -314,6 +316,7 @@ extension LoopSettings: RawRepresentable { raw["maximumBolus"] = maximumBolus raw["minimumBGGuard"] = suspendThreshold?.rawValue raw["dosingStrategy"] = dosingStrategy.rawValue + raw["deviceToken"] = deviceToken return raw }