diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2021-02-24 11:32:45 -0500 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2021-02-24 11:32:45 -0500 |
commit | f79292feac9801f90e2b28b426aa459b72681f33 (patch) | |
tree | ab88f88ef3bb60476fed15a28101b958c9f1687c /Example Apps | |
parent | 72f3c74ad1d99ab175405f95ceb3b041a58d1499 (diff) | |
download | sdl_ios-f79292feac9801f90e2b28b426aa459b72681f33.tar.gz |
Implement system info delegate in example apps
* Fix swift version of system info delegate
* Update RAIR system info log
* Add description method for System Info
Diffstat (limited to 'Example Apps')
-rw-r--r-- | Example Apps/Example ObjC/ProxyManager.m | 5 | ||||
-rw-r--r-- | Example Apps/Example Swift/ProxyManager.swift | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/Example Apps/Example ObjC/ProxyManager.m b/Example Apps/Example ObjC/ProxyManager.m index 0d13454d7..82a0165c1 100644 --- a/Example Apps/Example ObjC/ProxyManager.m +++ b/Example Apps/Example ObjC/ProxyManager.m @@ -318,6 +318,11 @@ NS_ASSUME_NONNULL_BEGIN return update; } +- (BOOL)didReceiveSystemInfo:(SDLSystemInfo *)systemInfo { + SDLLogD(@"Example app did receive system info: %@", systemInfo); + return YES; +} + @end NS_ASSUME_NONNULL_END diff --git a/Example Apps/Example Swift/ProxyManager.swift b/Example Apps/Example Swift/ProxyManager.swift index 8a53e7c76..5fb0fda22 100644 --- a/Example Apps/Example Swift/ProxyManager.swift +++ b/Example Apps/Example Swift/ProxyManager.swift @@ -146,7 +146,7 @@ private extension ProxyManager { // MARK: - SDLManagerDelegate extension ProxyManager: SDLManagerDelegate { - /// Called when the connection beween this app and the module has closed. + /// Called when the connection between this app and the module has closed. func managerDidDisconnect() { if delegate?.proxyState != .some(.stopped) { delegate?.didChangeProxyState(ProxyState.searching) @@ -234,6 +234,14 @@ extension ProxyManager: SDLManagerDelegate { return update } + + /// Called when connected module information becomes available + /// - Parameter systemInfo: The connected module's information + /// - Returns: True to continue connecting, false to disconnect immediately + func didReceive(systemInfo: SDLSystemInfo) -> Bool { + SDLLog.d("Example app got system info: \(systemInfo)") + return true + } } // MARK: - SDL UI |