summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2019-04-18 14:01:07 -0400
committerJoel Fischer <joeljfischer@gmail.com>2019-04-18 14:01:19 -0400
commita995cb9526eb4d4828dfde7b0a97e3f222a4ed97 (patch)
tree74952f7ce45558a50daaad2a9b2ce76f30b59700
parent8d93dee7808f72a78d1428cdcc4178901ea74e20 (diff)
downloadsdl_ios-a995cb9526eb4d4828dfde7b0a97e3f222a4ed97.tar.gz
Always autoreconnect after pulling USB cord
-rw-r--r--Example Apps/Example ObjC/ProxyManager.m7
-rw-r--r--Example Apps/Example Swift/ProxyManager.swift7
-rw-r--r--Example Apps/Shared/AppConstants.m1
-rw-r--r--SmartDeviceLink-iOS.xcodeproj/project.pbxproj1
4 files changed, 2 insertions, 14 deletions
diff --git a/Example Apps/Example ObjC/ProxyManager.m b/Example Apps/Example ObjC/ProxyManager.m
index a510c79ee..d61787f43 100644
--- a/Example Apps/Example ObjC/ProxyManager.m
+++ b/Example Apps/Example ObjC/ProxyManager.m
@@ -225,13 +225,8 @@ NS_ASSUME_NONNULL_BEGIN
#pragma mark - SDLManagerDelegate
- (void)managerDidDisconnect {
- [self sdlex_updateProxyState:ProxyStateStopped];
+ [self sdlex_updateProxyState:ProxyStateSearchingForConnection];
self.firstHMILevel = SDLHMILevelNone;
-
- // If desired, automatically start searching for a new connection to Core
- if (ExampleAppShouldRestartSDLManagerOnDisconnect) {
- [self startManager];
- }
}
- (void)hmiLevel:(SDLHMILevel)oldLevel didChangeToLevel:(SDLHMILevel)newLevel {
diff --git a/Example Apps/Example Swift/ProxyManager.swift b/Example Apps/Example Swift/ProxyManager.swift
index 3b0ca25a4..397be0878 100644
--- a/Example Apps/Example Swift/ProxyManager.swift
+++ b/Example Apps/Example Swift/ProxyManager.swift
@@ -141,13 +141,8 @@ private extension ProxyManager {
extension ProxyManager: SDLManagerDelegate {
/// Called when the connection beween this app and SDL Core has closed.
func managerDidDisconnect() {
- delegate?.didChangeProxyState(ProxyState.stopped)
+ delegate?.didChangeProxyState(ProxyState.searching)
firstHMILevelState = .none
-
- // If desired, automatically start searching for a new connection to Core
- if ExampleAppShouldRestartSDLManagerOnDisconnect.boolValue {
- startManager()
- }
}
/// Called when the state of the SDL app has changed. The state limits the type of RPC that can be sent. Refer to the class documentation for each RPC to determine what state(s) the RPC can be sent.
diff --git a/Example Apps/Shared/AppConstants.m b/Example Apps/Shared/AppConstants.m
index c96464d63..7e81eba13 100644
--- a/Example Apps/Shared/AppConstants.m
+++ b/Example Apps/Shared/AppConstants.m
@@ -13,7 +13,6 @@ NSString * const ExampleAppName = @"SDL Example App";
NSString * const ExampleAppNameShort = @"SDL";
NSString * const ExampleAppNameTTS = @"S D L Example App";
NSString * const ExampleFullAppId = @"123e4567-e89b-12d3-a456-426655440000"; // Dummy App Id
-BOOL const ExampleAppShouldRestartSDLManagerOnDisconnect = NO;
#pragma mark - SDL Textfields
NSString * const SmartDeviceLinkText = @"SmartDeviceLink (SDL)";
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
index 2fc6f2bd7..0df2f3786 100644
--- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
+++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
@@ -6699,7 +6699,6 @@
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
- English,
en,
Base,
fr,