From 808ede46737fcb2bf71da050109fcbd944496708 Mon Sep 17 00:00:00 2001 From: Bill Gestrich <3207996+gestrich@users.noreply.github.com> Date: Sat, 22 Apr 2023 06:37:13 -0400 Subject: [PATCH 1/4] Remote handling rearchitecture --- TidepoolServiceKit/TidepoolService.swift | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/TidepoolServiceKit/TidepoolService.swift b/TidepoolServiceKit/TidepoolService.swift index 79be649..b875549 100644 --- a/TidepoolServiceKit/TidepoolService.swift +++ b/TidepoolServiceKit/TidepoolService.swift @@ -612,14 +612,16 @@ extension TidepoolService: RemoteDataService { throw error } } - - public func commandFromPushNotification(_ notification: [String: AnyObject]) async throws -> RemoteCommand { - - enum TidepoolPushNotificationError: LocalizedError { - case remoteCommandsNotSupported - } - - throw TidepoolPushNotificationError.remoteCommandsNotSupported + + public func handleRemoteNotification(_ notification: [String: AnyObject]) async throws { + throw RemoteNotificationError.remoteCommandsNotSupported + } + + enum RemoteNotificationError: LocalizedError { + case remoteCommandsNotSupported + } + + public func processPendingRemoteCommands() async throws { } } From 0f1c1c66f5facc109f8e69a594f960250a769347 Mon Sep 17 00:00:00 2001 From: Bill Gestrich <3207996+gestrich@users.noreply.github.com> Date: Fri, 23 Jun 2023 05:25:55 -0400 Subject: [PATCH 2/4] Rename method --- TidepoolServiceKit/TidepoolService.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TidepoolServiceKit/TidepoolService.swift b/TidepoolServiceKit/TidepoolService.swift index b875549..57ed33b 100644 --- a/TidepoolServiceKit/TidepoolService.swift +++ b/TidepoolServiceKit/TidepoolService.swift @@ -613,7 +613,7 @@ extension TidepoolService: RemoteDataService { } } - public func handleRemoteNotification(_ notification: [String: AnyObject]) async throws { + public func remoteNotificationWasReceived(_ notification: [String: AnyObject]) async throws { throw RemoteNotificationError.remoteCommandsNotSupported } From 54b5ed9d958a745960eac1b32b456bed7083e614 Mon Sep 17 00:00:00 2001 From: Bill Gestrich <3207996+gestrich@users.noreply.github.com> Date: Fri, 23 Jun 2023 05:49:16 -0400 Subject: [PATCH 3/4] Update names --- TidepoolServiceKit/TidepoolService.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TidepoolServiceKit/TidepoolService.swift b/TidepoolServiceKit/TidepoolService.swift index 57ed33b..2d0c4d0 100644 --- a/TidepoolServiceKit/TidepoolService.swift +++ b/TidepoolServiceKit/TidepoolService.swift @@ -621,7 +621,7 @@ extension TidepoolService: RemoteDataService { case remoteCommandsNotSupported } - public func processPendingRemoteCommands() async throws { + public func loopDidComplete() async throws { } } From 54e5b488722a921692aff523c4ac1924384b1fdf Mon Sep 17 00:00:00 2001 From: Bill Gestrich <3207996+gestrich@users.noreply.github.com> Date: Sat, 24 Jun 2023 09:17:15 -0400 Subject: [PATCH 4/4] Remove Remote 2.0 parts --- TidepoolServiceKit/TidepoolService.swift | 3 --- 1 file changed, 3 deletions(-) diff --git a/TidepoolServiceKit/TidepoolService.swift b/TidepoolServiceKit/TidepoolService.swift index 2d0c4d0..3d5f821 100644 --- a/TidepoolServiceKit/TidepoolService.swift +++ b/TidepoolServiceKit/TidepoolService.swift @@ -620,9 +620,6 @@ extension TidepoolService: RemoteDataService { enum RemoteNotificationError: LocalizedError { case remoteCommandsNotSupported } - - public func loopDidComplete() async throws { - } } extension KeychainManager: SessionStorage {