|
...
|
...
|
@@ -9,6 +9,10 @@ enum ImageProcessError: Error{ |
|
|
|
}
|
|
|
|
|
|
|
|
final class WearEngineHostApiImpl: WearEngineHostApi {
|
|
|
|
func checkConnectedDevice(completion: @escaping (Result<WearDeviceInfo?, any Error>) -> Void) {
|
|
|
|
completion(.success(watchService.currentDeviceInfo()))
|
|
|
|
}
|
|
|
|
|
|
|
|
func addWatchSurface(completion: @escaping (Result<Bool, any Error>) -> Void) {
|
|
|
|
completion(.failure(ImageProcessError.noWatchFound))
|
|
|
|
}
|
|
...
|
...
|
@@ -29,10 +33,6 @@ final class WearEngineHostApiImpl: WearEngineHostApi { |
|
|
|
watchService.hasAvailableDevices()
|
|
|
|
}
|
|
|
|
|
|
|
|
func checkConnectedDevice() throws -> WearDeviceInfo? {
|
|
|
|
watchService.currentDeviceInfo()
|
|
|
|
}
|
|
|
|
|
|
|
|
func registerMessageReceiver() throws -> Bool {
|
|
|
|
watchService.activate()
|
|
|
|
}
|
...
|
...
|
|