Showing
1 changed file
with
4 additions
and
4 deletions
| @@ -9,6 +9,10 @@ enum ImageProcessError: Error{ | @@ -9,6 +9,10 @@ enum ImageProcessError: Error{ | ||
| 9 | } | 9 | } |
| 10 | 10 | ||
| 11 | final class WearEngineHostApiImpl: WearEngineHostApi { | 11 | final class WearEngineHostApiImpl: WearEngineHostApi { |
| 12 | + func checkConnectedDevice(completion: @escaping (Result<WearDeviceInfo?, any Error>) -> Void) { | ||
| 13 | + completion(.success(watchService.currentDeviceInfo())) | ||
| 14 | + } | ||
| 15 | + | ||
| 12 | func addWatchSurface(completion: @escaping (Result<Bool, any Error>) -> Void) { | 16 | func addWatchSurface(completion: @escaping (Result<Bool, any Error>) -> Void) { |
| 13 | completion(.failure(ImageProcessError.noWatchFound)) | 17 | completion(.failure(ImageProcessError.noWatchFound)) |
| 14 | } | 18 | } |
| @@ -29,10 +33,6 @@ final class WearEngineHostApiImpl: WearEngineHostApi { | @@ -29,10 +33,6 @@ final class WearEngineHostApiImpl: WearEngineHostApi { | ||
| 29 | watchService.hasAvailableDevices() | 33 | watchService.hasAvailableDevices() |
| 30 | } | 34 | } |
| 31 | 35 | ||
| 32 | - func checkConnectedDevice() throws -> WearDeviceInfo? { | ||
| 33 | - watchService.currentDeviceInfo() | ||
| 34 | - } | ||
| 35 | - | ||
| 36 | func registerMessageReceiver() throws -> Bool { | 36 | func registerMessageReceiver() throws -> Bool { |
| 37 | watchService.activate() | 37 | watchService.activate() |
| 38 | } | 38 | } |
-
Please register or login to post a comment