diff options
author | Muller, Alexander (A.) <amulle19@ford.com> | 2016-07-17 12:28:33 -0700 |
---|---|---|
committer | Muller, Alexander (A.) <amulle19@ford.com> | 2016-07-17 12:28:33 -0700 |
commit | bb4adcbfe28bf406baf88630b239c8d021e54f73 (patch) | |
tree | ace7654595ffa782034bbcf487e132d8f3b1ab88 | |
parent | 0baeebb2b6eba28220487c17303c091d7291c249 (diff) | |
parent | 6a9b93efcf87610256fe972ed7a6581596709f20 (diff) | |
download | sdl_ios-bb4adcbfe28bf406baf88630b239c8d021e54f73.tar.gz |
Merge remote-tracking branch 'origin/develop' into feature/touch_manager
* origin/develop:
Update for v4.1.4
Fix not handling the TCP disconnect case
Update README.md
Update README.md
Add documentation coverage badge to README
-rw-r--r-- | CHANGELOG.md | 7 | ||||
-rw-r--r-- | Cartfile.resolved | 6 | ||||
-rw-r--r-- | README.md | 9 | ||||
-rw-r--r-- | SmartDeviceLink-iOS.podspec | 2 | ||||
-rw-r--r-- | SmartDeviceLink/Info.plist | 2 | ||||
-rw-r--r-- | SmartDeviceLink/SDLProxy.m | 2 | ||||
-rw-r--r-- | SmartDeviceLink/SDLTCPTransport.m | 20 |
7 files changed, 32 insertions, 16 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 303a38057..aae67c3cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# 4.1.4 Release Notes +### Bug Fixes +* Fixed exception causing app to crash when SDL Core disconnects in TCP debug mode. Warning: The app may enter an undefined connection state as there is currently no retry strategy in TCP debug mode. + +### Other +* Update test frameworks + # 4.1.3 Release Notes ### Enhancements * Fix unit tests attempting to be built against Xcode 7.1 instead of Xcode 7.3. (#413) diff --git a/Cartfile.resolved b/Cartfile.resolved index b4e50e149..c5031d700 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,4 +1,4 @@ -github "Quick/Nimble" "v4.0.1" -github "AliSoftware/OHHTTPStubs" "5.0.0" +github "Quick/Nimble" "v4.1.0" +github "AliSoftware/OHHTTPStubs" "5.1.0" github "Quick/Quick" "v0.9.2" -github "erikdoe/ocmock" "v3.3" +github "erikdoe/ocmock" "v3.3.1" @@ -1,9 +1,12 @@ -[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) + [![Version](https://img.shields.io/cocoapods/v/SmartDeviceLink-iOS.svg?style=flat)](https://cocoapods.org/pods/SmartDeviceLink-iOS) [![License](https://img.shields.io/cocoapods/l/SmartDeviceLink-iOS.svg?style=flat)](https://cocoapods.org/pods/SmartDeviceLink-iOS) [![Build Status](https://img.shields.io/travis/smartdevicelink/sdl_ios/master.svg?style=flat)](https://travis-ci.org/smartdevicelink/sdl_ios) [![codecov](https://codecov.io/gh/smartdevicelink/sdl_ios/branch/master/graph/badge.svg)](https://codecov.io/gh/smartdevicelink/sdl_ios) -[![Slack Status](http://sdlslack.herokuapp.com/badge.svg)](http://slack.smartdevicelink.org) +[![Documentation](https://img.shields.io/cocoapods/metrics/doc-percent/SmartDeviceLink-iOS.svg)](http://cocoadocs.org/docsets/SmartDeviceLink-iOS/) +[![CocoaPods Downloads](https://img.shields.io/cocoapods/dt/SmartDeviceLink-iOS.svg?maxAge=172800)](https://cocoapods.org/pods/SmartDeviceLink-iOS) +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![Slack Status](http://sdlslack.herokuapp.com/badge.svg)](http://slack.smartdevicelink.com) # SmartDeviceLink (SDL) @@ -187,7 +190,7 @@ self.proxy = nil; ``` #### onOnHMIStatus -When your app receives `onOnHMIStatus` it has changed HMI states on the head unit. For example, your application can be put into `HMI_FULL` meaning that it has full access to the vehicle screen. For more info on HMI Levels, [see the Cocoadoc documentation on the enum](http://cocoadocs.org/docsets/SmartDeviceLink-iOS/4.1.3/Classes/SDLHMILevel.html). +When your app receives `onOnHMIStatus` it has changed HMI states on the head unit. For example, your application can be put into `HMI_FULL` meaning that it has full access to the vehicle screen. For more info on HMI Levels, [see the Cocoadoc documentation on the enum](http://cocoadocs.org/docsets/SmartDeviceLink-iOS/4.1.4/Classes/SDLHMILevel.html). You will want to track your first HMI FULL, for instance with a boolean value. The example application has extremely basic tracking of this type in the `onOnHMIStatus` callback. diff --git a/SmartDeviceLink-iOS.podspec b/SmartDeviceLink-iOS.podspec index 452744484..54166011e 100644 --- a/SmartDeviceLink-iOS.podspec +++ b/SmartDeviceLink-iOS.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "SmartDeviceLink-iOS" -s.version = "4.1.3" +s.version = "4.1.4" s.summary = "Connect your app with cars!" s.homepage = "https://github.com/smartdevicelink/SmartDeviceLink-iOS" s.license = { :type => "New BSD", :file => "LICENSE" } diff --git a/SmartDeviceLink/Info.plist b/SmartDeviceLink/Info.plist index a19ea3e84..f315b0aca 100644 --- a/SmartDeviceLink/Info.plist +++ b/SmartDeviceLink/Info.plist @@ -15,7 +15,7 @@ <key>CFBundlePackageType</key> <string>FMWK</string> <key>CFBundleShortVersionString</key> - <string>4.1.3</string> + <string>4.1.4</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> diff --git a/SmartDeviceLink/SDLProxy.m b/SmartDeviceLink/SDLProxy.m index 8fa823b63..bc5ef192f 100644 --- a/SmartDeviceLink/SDLProxy.m +++ b/SmartDeviceLink/SDLProxy.m @@ -46,7 +46,7 @@ typedef void (^URLSessionTaskCompletionHandler)(NSData *data, NSURLResponse *response, NSError *error); typedef void (^URLSessionDownloadTaskCompletionHandler)(NSURL *location, NSURLResponse *response, NSError *error); -NSString *const SDLProxyVersion = @"4.1.3"; +NSString *const SDLProxyVersion = @"4.1.4"; const float startSessionTime = 10.0; const float notifyProxyClosedDelay = 0.1; const int POLICIES_CORRELATION_ID = 65535; diff --git a/SmartDeviceLink/SDLTCPTransport.m b/SmartDeviceLink/SDLTCPTransport.m index 81fc9c555..460b3648c 100644 --- a/SmartDeviceLink/SDLTCPTransport.m +++ b/SmartDeviceLink/SDLTCPTransport.m @@ -45,7 +45,7 @@ static void TCPCallback(CFSocketRef socket, CFSocketCallBackType type, CFDataRef - (void)connect { - [SDLDebugTool logInfo:@"Init" withType:SDLDebugType_Transport_TCP]; + [SDLDebugTool logInfo:@"TCP Transport attempt connect" withType:SDLDebugType_Transport_TCP]; int sock_fd = call_socket([self.hostName UTF8String], [self.portNumber UTF8String]); if (sock_fd < 0) { @@ -88,6 +88,8 @@ static void TCPCallback(CFSocketRef socket, CFSocketCallBackType type, CFDataRef } - (void)destructObjects { + [SDLDebugTool logInfo:@"SDLTCPTransport invalidate and dispose"]; + if (!_alreadyDestructed) { _alreadyDestructed = YES; if (socket != nil) { @@ -151,15 +153,19 @@ int call_socket(const char *hostname, const char *port) { static void TCPCallback(CFSocketRef socket, CFSocketCallBackType type, CFDataRef address, const void *data, void *info) { if (kCFSocketConnectCallBack == type) { SDLTCPTransport *transport = (__bridge SDLTCPTransport *)info; - SInt32 errorNumber = 0; - if (data) { - SInt32 *errorNumberPtr = (SInt32 *)data; - errorNumber = *errorNumberPtr; - } [transport.delegate onTransportConnected]; } else if (kCFSocketDataCallBack == type) { SDLTCPTransport *transport = (__bridge SDLTCPTransport *)info; - + + // Check if Core disconnected from us + if (CFDataGetLength((CFDataRef)data) <= 0) { + [SDLDebugTool logInfo:@"TCPCallback Got a data packet with length 0, the connection was terminated on the other side"]; + [transport.delegate onTransportDisconnected]; + + return; + } + + // Handle the data we received NSMutableString *byteStr = [NSMutableString stringWithCapacity:((int)CFDataGetLength((CFDataRef)data) * 2)]; for (int i = 0; i < (int)CFDataGetLength((CFDataRef)data); i++) { [byteStr appendFormat:@"%02X", ((Byte *)(UInt8 *)CFDataGetBytePtr((CFDataRef)data))[i]]; |