Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
joeljfischer committed Jan 9, 2020
2 parents cd13e0a + 26fc6bf commit e948511
Show file tree
Hide file tree
Showing 230 changed files with 4,758 additions and 6,898 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
@@ -1,4 +1,21 @@
# Changelog
## 6.5.0 (Since RC 1)
### Bug Fixes
* Update testing dependencies and fix a few tests that fail after updating OCMock to 3.5.0 due to mocks not being used properly in a test (https://www.github.com/smartdevicelink/sdl_ios/issues/1517).

## 6.5.0 Release Candidate 1
### Bug Fixes
* Fix the `SDLSystemCapabilityManager subscribeToCapabilityType:withObserver:selector:` not returning a BOOL as was declared (https://www.github.com/smartdevicelink/sdl_ios/issues/1465).
* Fix the Soft Button Manager failing if the template is changed and the new template does not support soft buttons (https://www.github.com/smartdevicelink/sdl_ios/issues/1474).
* Objective-C++ projects that previously saw APIs that caused a compiler failure due to keyword restrictions will now no longer see those APIs and will see different APIs instead. All non-Objective-C++ projects will be unchanged. Because the previous release was un-compilable, we are considering this a minor change instead of a major change due to adding APIs (https://www.github.com/smartdevicelink/sdl_ios/issues/1478).
* In some cases the lock screen would show status bar rotation even though the view controller didn't rotate (https://www.github.com/smartdevicelink/sdl_ios/issues/1480).
* Fix the security manager not being set when using a secondary transport in certain cases (https://www.github.com/smartdevicelink/sdl_ios/issues/1482).
* Fix `Show.templateConfiguration` RPC parameter not getting set properly (https://www.github.com/smartdevicelink/sdl_ios/issues/1486).
* In some cases the lock screen window would cause the app's window to display incorrectly when dismissed (https://www.github.com/smartdevicelink/sdl_ios/issues/1492).
* Attempt to fix a background crash when disconnecting – note that your app will still close due to iOS' background restrictions (https://www.github.com/smartdevicelink/sdl_ios/issues/1494).
* In some cases the lock screen window would continue to hide the app's window when dismissed (https://www.github.com/smartdevicelink/sdl_ios/issues/1496).
* When the app runs more than one `UIWindow`, the lock screen manager would sometimes choose the wrong window to display when the lock window is dismissed (https://www.github.com/smartdevicelink/sdl_ios/issues/1501).

## 6.4.1
### Bug Fixes
* Update code documentation (https://www.github.com/smartdevicelink/sdl_ios/issues/983).
Expand Down
4 changes: 2 additions & 2 deletions Cartfile.resolved
@@ -1,4 +1,4 @@
github "Quick/Nimble" "v8.0.4"
github "Quick/Nimble" "v8.0.5"
github "Quick/Quick" "v2.2.0"
github "erikdoe/ocmock" "v3.4.3"
github "erikdoe/ocmock" "v3.5"
github "uber/ios-snapshot-test-case" "6.2.0"
Expand Up @@ -92,25 +92,6 @@
<string>com.ford.sync.prot0</string>
<string>com.smartdevicelink.multisession</string>
</array>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<true/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
<key>UISceneConfigurationName</key>
<string>Default</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
Expand Down
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -37,7 +37,7 @@ See the [changelog](https://github.com/smartdevicelink/sdl_ios/blob/master/CHANG

You can install this library using [Accio/SwiftPM](https://github.com/JamitLabs/Accio) documentation page. Please follow the steps to install and initialization Accio into a current or new application.

In your Package.swift file , you want to add `.package(url: "https://github.com/smartdevicelink/sdl_ios.git", .from: "6.4.0"),` to the dependencies array. Then add `SmartDeviceLink` to the targets dependencies array.
In your Package.swift file , you want to add `.package(url: "https://github.com/smartdevicelink/sdl_ios.git", .from: "6.5.0"),` to the dependencies array. Then add `SmartDeviceLink` to the targets dependencies array.

Please see [Mainifest format](https://github.com/apple/swift-package-manager/blob/master/Documentation/PackageDescriptionV4.md) to specify dependencies to a specific branch / version of SDL.

Expand All @@ -49,10 +49,10 @@ If you are building a Swift app, then add this instead `SmartDeviceLinkSwift` to

You can install this library using [Cocoapods](https://cocoapods.org/pods/SmartDeviceLink-iOS). You can get started with Cocoapods by [following their install guide](https://guides.cocoapods.org/using/getting-started.html#getting-started), and learn how to use Cocoapods to install dependencies [by following this guide](https://guides.cocoapods.org/using/using-cocoapods.html).

In your podfile, you want to add `pod 'SmartDeviceLink', '~> 6.4'`. Then run `pod install` inside your terminal. With Cocoapods, we support iOS 8.0+.
In your podfile, you want to add `pod 'SmartDeviceLink', '~> 6.5'`. Then run `pod install` inside your terminal. With Cocoapods, we support iOS 8.0+.

###### Swift
If you are building a Swift app, then add this instead `pod 'SmartDeviceLink/Swift', '~> 6.4'`. Then run `pod install` in your terminal.
If you are building a Swift app, then add this instead `pod 'SmartDeviceLink/Swift', '~> 6.5'`. Then run `pod install` in your terminal.

##### Carthage

Expand Down
2 changes: 1 addition & 1 deletion SmartDeviceLink-iOS.podspec
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "SmartDeviceLink-iOS"
s.version = "6.4.1"
s.version = "6.5.0"
s.summary = "Connect your app with cars!"
s.homepage = "https://github.com/smartdevicelink/SmartDeviceLink-iOS"
s.license = { :type => "New BSD", :file => "LICENSE" }
Expand Down
32 changes: 16 additions & 16 deletions SmartDeviceLink-iOS.xcodeproj/project.pbxproj
Expand Up @@ -1222,8 +1222,6 @@
5DCC458D221C9F6600036C2F /* SDLVersionSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DCC458C221C9F6600036C2F /* SDLVersionSpec.m */; };
5DCD7AE01FCCA8D200A0FC7F /* SDLCarWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DCD7ADC1FCCA8D100A0FC7F /* SDLCarWindow.h */; };
5DCD7AE11FCCA8D200A0FC7F /* SDLCarWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DCD7ADD1FCCA8D200A0FC7F /* SDLCarWindow.m */; };
5DCD7AF31FCCA8E400A0FC7F /* SDLScreenshotViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DCD7AE61FCCA8E400A0FC7F /* SDLScreenshotViewController.h */; };
5DCD7AF71FCCA8E400A0FC7F /* SDLScreenshotViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DCD7AEA1FCCA8E400A0FC7F /* SDLScreenshotViewController.m */; };
5DCF76F51ACDBAD300BB647B /* SDLSendLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DCF76F31ACDBAD300BB647B /* SDLSendLocation.h */; settings = {ATTRIBUTES = (Public, ); }; };
5DCF76F61ACDBAD300BB647B /* SDLSendLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DCF76F41ACDBAD300BB647B /* SDLSendLocation.m */; };
5DCF76F91ACDD7CD00BB647B /* SDLSendLocationResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DCF76F71ACDD7CD00BB647B /* SDLSendLocationResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand Down Expand Up @@ -1286,6 +1284,8 @@
880245A520F79C3400ED195B /* SDLFileManagerConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 880245A320F79C3400ED195B /* SDLFileManagerConfiguration.m */; };
8803DCEF22C2B84B00FBB7CE /* SDLBackgroundTaskManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 8803DCED22C2B84B00FBB7CE /* SDLBackgroundTaskManager.h */; };
8803DCF022C2B84B00FBB7CE /* SDLBackgroundTaskManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8803DCEE22C2B84B00FBB7CE /* SDLBackgroundTaskManager.m */; };
880723EB23A2CFB4003D0489 /* SDLLockScreenRootViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 880723E923A2CFB4003D0489 /* SDLLockScreenRootViewController.h */; };
880723EC23A2CFB4003D0489 /* SDLLockScreenRootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 880723EA23A2CFB4003D0489 /* SDLLockScreenRootViewController.m */; };
880D267A220DDD1000B3F496 /* SDLWeatherServiceDataSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 880D2679220DDD1000B3F496 /* SDLWeatherServiceDataSpec.m */; };
880D267D220DE5DF00B3F496 /* SDLWeatherServiceManifest.h in Headers */ = {isa = PBXBuildFile; fileRef = 880D267B220DE5DF00B3F496 /* SDLWeatherServiceManifest.h */; settings = {ATTRIBUTES = (Public, ); }; };
880D267E220DE5DF00B3F496 /* SDLWeatherServiceManifest.m in Sources */ = {isa = PBXBuildFile; fileRef = 880D267C220DE5DF00B3F496 /* SDLWeatherServiceManifest.m */; };
Expand Down Expand Up @@ -2971,8 +2971,6 @@
5DCC458C221C9F6600036C2F /* SDLVersionSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SDLVersionSpec.m; path = DevAPISpecs/SDLVersionSpec.m; sourceTree = "<group>"; };
5DCD7ADC1FCCA8D100A0FC7F /* SDLCarWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLCarWindow.h; sourceTree = "<group>"; };
5DCD7ADD1FCCA8D200A0FC7F /* SDLCarWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLCarWindow.m; sourceTree = "<group>"; };
5DCD7AE61FCCA8E400A0FC7F /* SDLScreenshotViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLScreenshotViewController.h; sourceTree = "<group>"; };
5DCD7AEA1FCCA8E400A0FC7F /* SDLScreenshotViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLScreenshotViewController.m; sourceTree = "<group>"; };
5DCF76F31ACDBAD300BB647B /* SDLSendLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLSendLocation.h; sourceTree = "<group>"; };
5DCF76F41ACDBAD300BB647B /* SDLSendLocation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLSendLocation.m; sourceTree = "<group>"; };
5DCF76F71ACDD7CD00BB647B /* SDLSendLocationResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLSendLocationResponse.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3035,6 +3033,8 @@
880245A320F79C3400ED195B /* SDLFileManagerConfiguration.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLFileManagerConfiguration.m; sourceTree = "<group>"; };
8803DCED22C2B84B00FBB7CE /* SDLBackgroundTaskManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLBackgroundTaskManager.h; sourceTree = "<group>"; };
8803DCEE22C2B84B00FBB7CE /* SDLBackgroundTaskManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLBackgroundTaskManager.m; sourceTree = "<group>"; };
880723E923A2CFB4003D0489 /* SDLLockScreenRootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLLockScreenRootViewController.h; sourceTree = "<group>"; };
880723EA23A2CFB4003D0489 /* SDLLockScreenRootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLLockScreenRootViewController.m; sourceTree = "<group>"; };
880D2679220DDD1000B3F496 /* SDLWeatherServiceDataSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLWeatherServiceDataSpec.m; sourceTree = "<group>"; };
880D267B220DE5DF00B3F496 /* SDLWeatherServiceManifest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLWeatherServiceManifest.h; sourceTree = "<group>"; };
880D267C220DE5DF00B3F496 /* SDLWeatherServiceManifest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLWeatherServiceManifest.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -5419,8 +5419,6 @@
5D616B481D552F7A00553F6B /* SDLLockScreen.storyboard */,
5D6F7A331BC5B9B60070BF37 /* SDLLockScreenViewController.h */,
5D6F7A341BC5B9B60070BF37 /* SDLLockScreenViewController.m */,
5DCD7AE61FCCA8E400A0FC7F /* SDLScreenshotViewController.h */,
5DCD7AEA1FCCA8E400A0FC7F /* SDLScreenshotViewController.m */,
);
name = "Lock Screen UI";
sourceTree = "<group>";
Expand Down Expand Up @@ -5464,6 +5462,8 @@
5D76E31F1D39731100647CFA /* Utilities */ = {
isa = PBXGroup;
children = (
880723E923A2CFB4003D0489 /* SDLLockScreenRootViewController.h */,
880723EA23A2CFB4003D0489 /* SDLLockScreenRootViewController.m */,
5D76E3201D39742300647CFA /* SDLViewControllerPresentable.h */,
5D76E3221D39767000647CFA /* SDLLockScreenPresenter.h */,
5D76E3231D39767000647CFA /* SDLLockScreenPresenter.m */,
Expand Down Expand Up @@ -6604,7 +6604,6 @@
5D61FC781A84238C00846EE7 /* SDLDeleteFileResponse.h in Headers */,
5DA240001F325621009C0313 /* SDLStreamingMediaConfiguration.h in Headers */,
5D61FC5F1A84238C00846EE7 /* SDLCharacterSet.h in Headers */,
5DCD7AF31FCCA8E400A0FC7F /* SDLScreenshotViewController.h in Headers */,
5DD67CC71E68B568009CD394 /* SDLLogMacros.h in Headers */,
5D61FCFF1A84238C00846EE7 /* SDLOnAppInterfaceUnregistered.h in Headers */,
5D61FDC51A84238C00846EE7 /* SDLTCPTransport.h in Headers */,
Expand Down Expand Up @@ -6651,6 +6650,7 @@
8854682F2225BDAE00994D8D /* SDLHybridAppPreference.h in Headers */,
5D9FDA901F2A7D3400A495C8 /* bson_array.h in Headers */,
5D61FDCB1A84238C00846EE7 /* SDLTextFieldName.h in Headers */,
880723EB23A2CFB4003D0489 /* SDLLockScreenRootViewController.h in Headers */,
5D61FD8B1A84238C00846EE7 /* SDLSetMediaClockTimer.h in Headers */,
DA6223BD1E7B088200878689 /* CVPixelBufferRef+SDLUtil.h in Headers */,
5D61FD031A84238C00846EE7 /* SDLOnButtonEvent.h in Headers */,
Expand Down Expand Up @@ -7540,6 +7540,7 @@
008DB36A22EA8261003F458C /* SDLReleaseInteriorVehicleDataModule.m in Sources */,
88E6F1A8220E1588006156F9 /* SDLMediaType.m in Sources */,
5D61FC4E1A84238C00846EE7 /* SDLBitsPerSample.m in Sources */,
880723EC23A2CFB4003D0489 /* SDLLockScreenRootViewController.m in Sources */,
5D00AC701F1511B9004000D9 /* SDLGetSystemCapability.m in Sources */,
5D61FDEA1A84238C00846EE7 /* SDLUnsubscribeButtonResponse.m in Sources */,
7538765022D8CEDB00FE8484 /* SDLShowAppMenu.m in Sources */,
Expand Down Expand Up @@ -7811,7 +7812,6 @@
5D9FDA911F2A7D3400A495C8 /* bson_object.c in Sources */,
5D61FD001A84238C00846EE7 /* SDLOnAppInterfaceUnregistered.m in Sources */,
5D61FC6C1A84238C00846EE7 /* SDLCreateInteractionChoiceSet.m in Sources */,
5DCD7AF71FCCA8E400A0FC7F /* SDLScreenshotViewController.m in Sources */,
1EB59CA4202D92F600343A61 /* SDLMassageMode.m in Sources */,
5D61FD081A84238C00846EE7 /* SDLOnCommand.m in Sources */,
5D53C46E1B7A99B9003526EA /* SDLStreamingMediaManager.m in Sources */,
Expand Down Expand Up @@ -8573,7 +8573,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Example Apps/Example ObjC/SmartDeviceLink-Example-ObjC-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 6.4.1;
MARKETING_VERSION = 6.5.0;
PRODUCT_BUNDLE_IDENTIFIER = com.smartdevicelink.SDLTestApp;
PRODUCT_NAME = "SDL Example";
SWIFT_VERSION = 5.0;
Expand All @@ -8589,7 +8589,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Example Apps/Example ObjC/SmartDeviceLink-Example-ObjC-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 6.4.1;
MARKETING_VERSION = 6.5.0;
PRODUCT_BUNDLE_IDENTIFIER = com.smartdevicelink.SDLTestApp;
PRODUCT_NAME = "SDL Example";
SWIFT_VERSION = 5.0;
Expand Down Expand Up @@ -8632,7 +8632,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = "$(inherited)";
MARKETING_VERSION = 6.4.1;
MARKETING_VERSION = 6.5.0;
PRODUCT_BUNDLE_IDENTIFIER = com.smartdevicelink.smartdevicelink;
PRODUCT_NAME = "$(TARGET_NAME)";
RUN_CLANG_STATIC_ANALYZER = YES;
Expand Down Expand Up @@ -8677,7 +8677,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = "$(inherited)";
MARKETING_VERSION = 6.4.1;
MARKETING_VERSION = 6.5.0;
PRODUCT_BUNDLE_IDENTIFIER = com.smartdevicelink.smartdevicelink;
PRODUCT_NAME = "$(TARGET_NAME)";
RUN_CLANG_STATIC_ANALYZER = YES;
Expand Down Expand Up @@ -8767,7 +8767,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Example Apps/Example Swift/SmartDeviceLink-Example-Swift-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 6.4.1;
MARKETING_VERSION = 6.5.0;
PRODUCT_BUNDLE_IDENTIFIER = com.smartdevicelink.SDLTestApp;
PRODUCT_NAME = "SDL Example Swift";
SWIFT_OBJC_BRIDGING_HEADER = "Example Apps/Example Swift/SmartDeviceLink-Example-Swift-Bridging-Header.h";
Expand All @@ -8787,7 +8787,7 @@
INFOPLIST_FILE = "$(SRCROOT)/Example Apps/Example Swift/SmartDeviceLink-Example-Swift-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 6.4.1;
MARKETING_VERSION = 6.5.0;
PRODUCT_BUNDLE_IDENTIFIER = com.smartdevicelink.SDLTestApp;
PRODUCT_NAME = "SDL Example Swift";
SWIFT_OBJC_BRIDGING_HEADER = "Example Apps/Example Swift/SmartDeviceLink-Example-Swift-Bridging-Header.h";
Expand Down Expand Up @@ -8833,7 +8833,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = "$(inherited)";
MARKETING_VERSION = 6.4.1;
MARKETING_VERSION = 6.5.0;
PRODUCT_BUNDLE_IDENTIFIER = com.smartdevicelink.SmartDeviceLinkSwift;
PRODUCT_NAME = "$(TARGET_NAME)";
RUN_CLANG_STATIC_ANALYZER = YES;
Expand Down Expand Up @@ -8883,7 +8883,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
LIBRARY_SEARCH_PATHS = "$(inherited)";
MARKETING_VERSION = 6.4.1;
MARKETING_VERSION = 6.5.0;
PRODUCT_BUNDLE_IDENTIFIER = com.smartdevicelink.SmartDeviceLinkSwift;
PRODUCT_NAME = "$(TARGET_NAME)";
RUN_CLANG_STATIC_ANALYZER = YES;
Expand Down
2 changes: 1 addition & 1 deletion SmartDeviceLink.podspec
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "SmartDeviceLink"
s.version = "6.4.1"
s.version = "6.5.0"
s.summary = "Connect your app with cars!"
s.homepage = "https://github.com/smartdevicelink/SmartDeviceLink-iOS"
s.license = { :type => "New BSD", :file => "LICENSE" }
Expand Down
6 changes: 4 additions & 2 deletions SmartDeviceLink/SDLIAPSession.m
Expand Up @@ -61,10 +61,12 @@ - (void)stopStream:(NSStream *)stream {
if (status1 != NSStreamStatusNotOpen &&
status1 != NSStreamStatusClosed) {
[stream close];
} else if (status1 == NSStreamStatusNotOpen) {
// It's implicitly removed from the stream when it's closed, but not if it was never opened.
// When the USB cable is disconnected, the app will will call this method after the `NSStreamEventEndEncountered` event. The stream will already be in the closed state but it still needs to be removed from the run loop.
[stream removeFromRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
}

// When the USB cable is disconnected, the app will will call this method after the `NSStreamEventEndEncountered` event. The stream will already be in the closed state but it still needs to be removed from the run loop.
[stream removeFromRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
[stream setDelegate:nil];

NSUInteger status2 = stream.streamStatus;
Expand Down

0 comments on commit e948511

Please sign in to comment.