diff options
author | NicoleYarroch <nicole@livio.io> | 2020-05-14 16:01:24 -0400 |
---|---|---|
committer | NicoleYarroch <nicole@livio.io> | 2020-05-14 16:01:24 -0400 |
commit | 3941707015ba7958d0bafbc7dfb9132a6b416e27 (patch) | |
tree | 830c5a2924a7e84c9ce0dc9493d58c5dbaf3f8e8 | |
parent | 1f8a9889f255d09b4e414f8be76dbac8f67298b8 (diff) | |
download | sdl_ios-3941707015ba7958d0bafbc7dfb9132a6b416e27.tar.gz |
Revert commit to example app
Revert "Updated `isDialNumberSupported` example"
This reverts commit 89fb252858b50d6ed18c5eb66ab1b1de08f6fe05.
-rw-r--r-- | Example Apps/Example Swift/ProxyManager.swift | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/Example Apps/Example Swift/ProxyManager.swift b/Example Apps/Example Swift/ProxyManager.swift index e748043ba..4238251bf 100644 --- a/Example Apps/Example Swift/ProxyManager.swift +++ b/Example Apps/Example Swift/ProxyManager.swift @@ -301,33 +301,3 @@ private extension ProxyManager { return sdlManager.systemCapabilityManager.defaultMainWindowCapability?.imageFields?.first { $0.name == imageFieldName } != nil ? true : false } } - -extension ProxyManager { -func isDialNumberSupported(handler: @escaping (_ success: Bool, _ error: Error?) -> Void) { - // Check if the module has phone capabilities - guard (sdlManager.systemCapabilityManager.isCapabilitySupported(type: .phoneCall)) else { - return handler(false, nil) - } - - // Legacy modules (pre-RPC Spec v4.5) do not support checking capabilities, so for versions less than 4.5 we will assume `DialNumber` is supported - guard let sdlMsgVersion = sdlManager.registerResponse?.sdlMsgVersion, SDLVersion(sdlMsgVersion: sdlMsgVersion).isGreaterThanOrEqual(to: SDLVersion(major: 4, minor: 5, patch: 0)) else { - return handler(true, nil) - } - - // Check if the phone capability has already been retreived from the module - if let phoneCapability = sdlManager.systemCapabilityManager.phoneCapability { - // Check if the module supports the `DialNumber` request - return handler(phoneCapability.dialNumberEnabled?.boolValue ?? false, nil) - } - - // Retreive the phone capability from the module - sdlManager.systemCapabilityManager.updateCapabilityType(.phoneCall) { (error, systemCapabilityManager) in - if (error != nil) { - return handler(false, error) - } - - // Check if the module supports the `DialNumber` request - return handler(systemCapabilityManager.phoneCapability?.dialNumberEnabled?.boolValue ?? false, nil) - } -} -} |