Skip to content

Commit

Permalink
Merge pull request #2007 from smartdevicelink/develop
Browse files Browse the repository at this point in the history
v7.2.0 Release
  • Loading branch information
joeljfischer authored Jun 30, 2021
2 parents e3160f1 + 4f9c459 commit e05d613
Show file tree
Hide file tree
Showing 60 changed files with 2,605 additions and 857 deletions.
54 changes: 54 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,58 @@
# Changelog
## 7.2.0 (Since RC 1)
* Supports [SDL RPC Spec 7.1.0](https://github.com/smartdevicelink/rpc_spec/releases/tag/7.1.0) and [SDL Protocol Spec 5.4.0](https://github.com/smartdevicelink/protocol_spec/releases/tag/5.4.0).

### Testing
* Xcode 12.5
* iOS 14.6
* Core:
* Manticore (Core v7.1.1, Generic HMI v0.10.0)
* Ford Sync 3.4 (19353_DEVTEST)
* Ford Sync 3.0 (17276_DEVTEST)
* Ford Sync 4.0 (20016_DEVTEST)
* Core v6.1.2 with sdl_hmi v5.3.0 and generic_hmi v0.8.1

### Bug Fixes
* Fix incompatibility with some other 3rd-party libraries using math.h (https://github.com/smartdevicelink/sdl_ios/issues/1995)
* Numerous fixes to SDLVideoStreamingRange (https://github.com/smartdevicelink/sdl_ios/issues/2012)
* Fixed menu manager sending secondary image with menuCells when secondary images are not supported (https://github.com/smartdevicelink/sdl_ios/issues/2014)

### Other
* Fixed random failures in SDLVoiceCommandManagerSpec due to operations being canceled (https://github.com/smartdevicelink/sdl_ios/issues/2002)

## 7.2.0 RC 1
* Supports [SDL RPC Spec 7.1.0](https://github.com/smartdevicelink/rpc_spec/releases/tag/7.1.0) and [SDL Protocol Spec 5.4.0](https://github.com/smartdevicelink/protocol_spec/releases/tag/5.4.0).

### Testing
* Xcode 12.5
* iOS 14.6
* Core:
* Manticore (Core v7.1.1, Generic HMI v0.10.0)
* Ford Sync 3.4 (19353_DEVTEST)
* Ford Sync 3.0 (17276_DEVTEST)
* Ford Sync 4.0 (20016_DEVTEST)
* Core v6.1.2 with sdl_hmi v5.3.0 and generic_hmi v0.8.1

### Bug Fixes
* Added a workaround for Ford Sync 3.0 not properly sending back `MEDIA` template capabilities when set with `SetDisplayLayout` (https://github.com/smartdevicelink/sdl_ios/issues/1152)
* Video data that fails to encrypt is now properly handled (https://github.com/smartdevicelink/sdl_ios/issues/1830)
* When updating voice commands, any voice commands that are identical will have their handlers updated, but will no longer be deleted and re-uploaded (https://github.com/smartdevicelink/sdl_ios/issues/1855)
* Updating the main menu or choice sets now add unique identifiers to primary text based on which text fields and image fields will be displayed on the module (https://github.com/smartdevicelink/sdl_ios/issues/1940)
* Fixed preloading choices not properly marking which choices successfully loaded and which failed (https://github.com/smartdevicelink/sdl_ios/issues/1941)
* Voice commands with duplicate strings in an individual command will strip the duplicates (https://github.com/smartdevicelink/sdl_ios/issues/1961)
* Voice commands that contain duplicates between different commands will now fail early (https://github.com/smartdevicelink/sdl_ios/issues/1959)
* Voice commands that contain no strings will be stripped (https://github.com/smartdevicelink/sdl_ios/issues/1964)
* Fix file manager returning that files are not uploaded when they are on Core v4.5.0+ (https://github.com/smartdevicelink/sdl_ios/issues/1978)
* Fix displayed warnings (https://github.com/smartdevicelink/sdl_ios/issues/1988)
* Fix race condition in mutable dictionary (https://github.com/smartdevicelink/sdl_ios/issues/1996)
* Fix Ford Sync not properly returning `NON-MEDIA` template name in `RegisterAppInterfaceResponse` (https://github.com/smartdevicelink/sdl_ios/issues/1999)

### Other
* Fix failing haptic manager tests on Xcode 12.5 (https://github.com/smartdevicelink/sdl_ios/issues/1982)
* Fixed Obj-C example app not restarting properly when Core is shut down (https://github.com/smartdevicelink/sdl_ios/issues/1984)
* Fix missing test files (https://github.com/smartdevicelink/sdl_ios/issues/1985)
* Fix example apps button state not matching the image / text state when the app is reopened after exiting (https://github.com/smartdevicelink/sdl_ios/issues/1991)

## 7.1.1
### Versions
* Supports [SDL RPC Spec 7.1.0](https://github.com/smartdevicelink/rpc_spec/releases/tag/7.1.0) and [SDL Protocol Spec 5.4.0](https://github.com/smartdevicelink/protocol_spec/releases/tag/5.4.0).
Expand Down
12 changes: 8 additions & 4 deletions Example Apps/Example ObjC/ButtonManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ - (SDLSoftButtonObject *)sdlex_softButtonAlert {
SDLSoftButtonState *textState = [[SDLSoftButtonState alloc] initWithStateName:AlertSoftButtonTextState text:AlertSoftButtonText image:nil];

__weak typeof(self) weakself = self;
SDLSoftButtonObject *alertSoftButton = [[SDLSoftButtonObject alloc] initWithName:AlertSoftButton states:@[imageAndTextState, textState] initialStateName:imageAndTextState.name handler:^(SDLOnButtonPress * _Nullable buttonPress, SDLOnButtonEvent * _Nullable buttonEvent) {
NSString *initialButtonStateName = self.imagesEnabled ? imageAndTextState.name : textState.name;
SDLSoftButtonObject *alertSoftButton = [[SDLSoftButtonObject alloc] initWithName:AlertSoftButton states:@[imageAndTextState, textState] initialStateName:initialButtonStateName handler:^(SDLOnButtonPress * _Nullable buttonPress, SDLOnButtonEvent * _Nullable buttonEvent) {
if (buttonPress == nil) { return; }

if (self.sdlex_isAlertAllowed) {
Expand All @@ -99,7 +100,8 @@ - (SDLSoftButtonObject *)sdlex_softButtonSubtleAlert {
SDLSoftButtonState *textState = [[SDLSoftButtonState alloc] initWithStateName:SubtleAlertSoftButtonTextState text:SubtleAlertSoftButtonText image:nil];

__weak typeof(self) weakself = self;
SDLSoftButtonObject *subtleAlertSoftButton = [[SDLSoftButtonObject alloc] initWithName:SubtleAlertSoftButton states:@[imageAndTextState, textState] initialStateName:imageAndTextState.name handler:^(SDLOnButtonPress * _Nullable buttonPress, SDLOnButtonEvent * _Nullable buttonEvent) {
NSString *initialButtonStateName = self.imagesEnabled ? imageAndTextState.name : textState.name;
SDLSoftButtonObject *subtleAlertSoftButton = [[SDLSoftButtonObject alloc] initWithName:SubtleAlertSoftButton states:@[imageAndTextState, textState] initialStateName:initialButtonStateName handler:^(SDLOnButtonPress * _Nullable buttonPress, SDLOnButtonEvent * _Nullable buttonEvent) {
if (buttonPress == nil) { return; }

if (self.sdlex_isSubtleAlertAllowed) {
Expand All @@ -121,7 +123,8 @@ - (SDLSoftButtonObject *)sdlex_softButtonTextVisible {
SDLSoftButtonState *textOffState = [[SDLSoftButtonState alloc] initWithStateName:TextVisibleSoftButtonTextOffState text:TextVisibleSoftButtonTextOffText image:nil];

__weak typeof(self) weakself = self;
SDLSoftButtonObject *textButton = [[SDLSoftButtonObject alloc] initWithName:TextVisibleSoftButton states:@[textOnState, textOffState] initialStateName:textOnState.name handler:^(SDLOnButtonPress * _Nullable buttonPress, SDLOnButtonEvent * _Nullable buttonEvent) {
NSString *initialButtonStateName = self.textEnabled ? textOnState.name : textOffState.name;
SDLSoftButtonObject *textButton = [[SDLSoftButtonObject alloc] initWithName:TextVisibleSoftButton states:@[textOnState, textOffState] initialStateName:initialButtonStateName handler:^(SDLOnButtonPress * _Nullable buttonPress, SDLOnButtonEvent * _Nullable buttonEvent) {
if (buttonPress == nil) { return; }

weakself.textEnabled = !weakself.textEnabled;
Expand All @@ -140,7 +143,8 @@ - (SDLSoftButtonObject *)sdlex_softButtonImagesVisible {
SDLSoftButtonState *imagesOffState = [[SDLSoftButtonState alloc] initWithStateName:ImagesVisibleSoftButtonImageOffState text:ImagesVisibleSoftButtonImageOffText image:nil];

__weak typeof(self) weakself = self;
SDLSoftButtonObject *imagesButton = [[SDLSoftButtonObject alloc] initWithName:ImagesVisibleSoftButton states:@[imagesOnState, imagesOffState] initialStateName:imagesOnState.name handler:^(SDLOnButtonPress * _Nullable buttonPress, SDLOnButtonEvent * _Nullable buttonEvent) {
NSString *initialButtonStateName = self.imagesEnabled ? imagesOnState.name : imagesOffState.name;
SDLSoftButtonObject *imagesButton = [[SDLSoftButtonObject alloc] initWithName:ImagesVisibleSoftButton states:@[imagesOnState, imagesOffState] initialStateName:initialButtonStateName handler:^(SDLOnButtonPress * _Nullable buttonPress, SDLOnButtonEvent * _Nullable buttonEvent) {
if (buttonPress == nil) { return; }

weakself.imagesEnabled = !weakself.imagesEnabled;
Expand Down
4 changes: 1 addition & 3 deletions Example Apps/Example ObjC/ConnectionTCPTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ - (IBAction)connectButtonWasPressed:(UIButton *)sender {
#pragma mark - Table view delegate

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section != 0) {
return;
}
if (indexPath.section != 0) { return; }

switch (indexPath.row) {
case 0: {
Expand Down
31 changes: 14 additions & 17 deletions Example Apps/Example ObjC/ProxyManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ - (void)sdlex_startManager {

[weakSelf sdlex_updateProxyState:ProxyStateConnected];
[RPCPermissionsManager setupPermissionsCallbacksWithManager:weakSelf.sdlManager];
[weakSelf sdlex_showInitialData];

SDLLogD(@"SDL file manager storage: %lu mb", self.sdlManager.fileManager.bytesAvailable / 1024 / 1024);
}];
Expand All @@ -99,29 +98,27 @@ - (void)sdlex_updateProxyState:(ProxyState)newState {
- (void)startWithProxyTransportType:(ProxyTransportType)proxyTransportType {
[self sdlex_updateProxyState:ProxyStateSearchingForConnection];

SDLLifecycleConfiguration *lifecycleConfig = proxyTransportType == ProxyTransportTypeIAP ? [self.class sdlex_iapLifecycleConfiguration] : [self.class sdlex_tcpLifecycleConfiguration];
[self sdlex_setupConfigurationWithLifecycleConfiguration:lifecycleConfig];
SDLConfiguration *config = (proxyTransportType == ProxyTransportTypeIAP) ? [self.class sdlex_iapConfiguration] : [self.class sdlex_tcpConfiguration];
self.sdlManager = [[SDLManager alloc] initWithConfiguration:config delegate:self];
[self sdlex_startManager];
}

+ (SDLLifecycleConfiguration *)sdlex_iapLifecycleConfiguration {
return [self.class sdlex_setLifecycleConfigurationPropertiesOnConfiguration:[SDLLifecycleConfiguration defaultConfigurationWithAppName:ExampleAppName fullAppId:ExampleFullAppId]];
}
+ (SDLConfiguration *)sdlex_iapConfiguration {
SDLLifecycleConfiguration *lifecycleConfig = [self.class sdlex_setLifecycleConfigurationPropertiesOnConfiguration:[SDLLifecycleConfiguration defaultConfigurationWithAppName:ExampleAppName fullAppId:ExampleFullAppId]];

+ (SDLLifecycleConfiguration *)sdlex_tcpLifecycleConfiguration {
return [self.class sdlex_setLifecycleConfigurationPropertiesOnConfiguration:[SDLLifecycleConfiguration debugConfigurationWithAppName:ExampleAppName fullAppId:ExampleFullAppId ipAddress:[Preferences sharedPreferences].ipAddress port:[Preferences sharedPreferences].port]];
return [self sdlex_setupManagerConfigurationWithLifecycleConfiguration:lifecycleConfig];
}

- (void)sdlex_setupConfigurationWithLifecycleConfiguration:(SDLLifecycleConfiguration *)lifecycleConfiguration {
if (self.sdlManager != nil) {
// Manager already created, just start it again.
[self sdlex_startManager];
return;
}
+ (SDLConfiguration *)sdlex_tcpConfiguration {
SDLLifecycleConfiguration *lifecycleConfig = [self.class sdlex_setLifecycleConfigurationPropertiesOnConfiguration:[SDLLifecycleConfiguration debugConfigurationWithAppName:ExampleAppName fullAppId:ExampleFullAppId ipAddress:[Preferences sharedPreferences].ipAddress port:[Preferences sharedPreferences].port]];

return [self sdlex_setupManagerConfigurationWithLifecycleConfiguration:lifecycleConfig];
}

+ (SDLConfiguration *)sdlex_setupManagerConfigurationWithLifecycleConfiguration:(SDLLifecycleConfiguration *)lifecycleConfiguration {
SDLLockScreenConfiguration *lockScreenConfiguration = [SDLLockScreenConfiguration enabledConfigurationWithAppIcon:[UIImage imageNamed:ExampleAppLogoName] backgroundColor:nil];
SDLConfiguration *config = [[SDLConfiguration alloc] initWithLifecycle:lifecycleConfiguration lockScreen:lockScreenConfiguration logging:[self.class sdlex_logConfiguration] fileManager:[SDLFileManagerConfiguration defaultConfiguration] encryption:[SDLEncryptionConfiguration defaultConfiguration]];
self.sdlManager = [[SDLManager alloc] initWithConfiguration:config delegate:self];
[self sdlex_startManager];

return [[SDLConfiguration alloc] initWithLifecycle:lifecycleConfiguration lockScreen:lockScreenConfiguration logging:[self.class sdlex_logConfiguration] fileManager:[SDLFileManagerConfiguration defaultConfiguration] encryption:[SDLEncryptionConfiguration defaultConfiguration]];
}

+ (SDLLifecycleConfiguration *)sdlex_setLifecycleConfigurationPropertiesOnConfiguration:(SDLLifecycleConfiguration *)config {
Expand Down
12 changes: 8 additions & 4 deletions Example Apps/Example Swift/ButtonManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ extension ButtonManager {
private var softButtonAlert: SDLSoftButtonObject {
let imageAndTextState = SDLSoftButtonState(stateName: AlertSoftButtonImageAndTextState, text: AlertSoftButtonText, image: UIImage(named: AlertBWIconName)?.withRenderingMode(.alwaysTemplate))
let textState = SDLSoftButtonState(stateName: AlertSoftButtonTextState, text: AlertSoftButtonText, image: nil)
return SDLSoftButtonObject(name: AlertSoftButton, states: [imageAndTextState, textState], initialStateName: imageAndTextState.name) { [weak self] (buttonPress, buttonEvent) in
let initialButtonStateName = self.imagesEnabled ? imageAndTextState.name : textState.name
return SDLSoftButtonObject(name: AlertSoftButton, states: [imageAndTextState, textState], initialStateName: initialButtonStateName) { [weak self] (buttonPress, buttonEvent) in
guard let self = self, buttonPress != nil else { return }

if (self.isAlertAllowed) {
Expand All @@ -80,7 +81,8 @@ extension ButtonManager {
private var softButtonSubtleAlert: SDLSoftButtonObject {
let imageAndTextState = SDLSoftButtonState(stateName: SubtleAlertSoftButtonImageAndTextState, text: SubtleAlertSoftButtonText, image: UIImage(named: BatteryFullBWIconName)?.withRenderingMode(.alwaysTemplate))
let textState = SDLSoftButtonState(stateName: SubtleAlertSoftButtonTextState, text: SubtleAlertSoftButtonText, image: nil)
return SDLSoftButtonObject(name: SubtleAlertSoftButton, states: [imageAndTextState, textState], initialStateName: imageAndTextState.name) { [weak self] (buttonPress, buttonEvent) in
let initialButtonStateName = self.imagesEnabled ? imageAndTextState.name : textState.name
return SDLSoftButtonObject(name: SubtleAlertSoftButton, states: [imageAndTextState, textState], initialStateName: initialButtonStateName) { [weak self] (buttonPress, buttonEvent) in
guard let self = self, buttonPress != nil else { return }

if (self.isSubtleAlertAllowed) {
Expand All @@ -97,7 +99,8 @@ extension ButtonManager {
private var softButtonTextVisible: SDLSoftButtonObject {
let textVisibleState = SDLSoftButtonState(stateName: TextVisibleSoftButtonTextOnState, text: TextVisibleSoftButtonTextOnText, artwork: nil)
let textNotVisibleState = SDLSoftButtonState(stateName: TextVisibleSoftButtonTextOffState, text: TextVisibleSoftButtonTextOffText, image: nil)
return SDLSoftButtonObject(name: TextVisibleSoftButton, states: [textVisibleState, textNotVisibleState], initialStateName: textVisibleState.name) { [unowned self] (buttonPress, buttonEvent) in
let initialButtonStateName = self.textEnabled ? textVisibleState.name : textNotVisibleState.name
return SDLSoftButtonObject(name: TextVisibleSoftButton, states: [textVisibleState, textNotVisibleState], initialStateName: initialButtonStateName) { [unowned self] (buttonPress, buttonEvent) in
guard buttonPress != nil else { return }
self.textEnabled = !self.textEnabled

Expand All @@ -111,7 +114,8 @@ extension ButtonManager {
private var softButtonImagesVisible: SDLSoftButtonObject {
let imagesVisibleState = SDLSoftButtonState(stateName: ImagesVisibleSoftButtonImageOnState, text: ImagesVisibleSoftButtonImageOnText, image: nil)
let imagesNotVisibleState = SDLSoftButtonState(stateName: ImagesVisibleSoftButtonImageOffState, text: ImagesVisibleSoftButtonImageOffText, image: nil)
return SDLSoftButtonObject(name: ImagesVisibleSoftButton, states: [imagesVisibleState, imagesNotVisibleState], initialStateName: imagesVisibleState.name) { [weak self] (buttonPress, buttonEvent) in
let initialButtonStateName = self.imagesEnabled ? imagesVisibleState.name : imagesNotVisibleState.name
return SDLSoftButtonObject(name: ImagesVisibleSoftButton, states: [imagesVisibleState, imagesNotVisibleState], initialStateName: initialButtonStateName) { [weak self] (buttonPress, buttonEvent) in
guard let self = self, let sdlManager = self.sdlManager, buttonPress != nil else { return }

self.imagesEnabled = !self.imagesEnabled
Expand Down
11 changes: 6 additions & 5 deletions Example Apps/Example Swift/ProxyManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ extension ProxyManager {
/// - Parameter connectionType: The type of transport layer to use.
func start(with proxyTransportType: ProxyTransportType) {
delegate?.didChangeProxyState(ProxyState.searching)
sdlManager = SDLManager(configuration: proxyTransportType == .iap ? ProxyManager.connectIAP() : ProxyManager.connectTCP(), delegate: self)

sdlManager = SDLManager(configuration: (proxyTransportType == .iap) ? ProxyManager.iapConfiguration : ProxyManager.tcpConfiguration, delegate: self)
startManager()
}

Expand All @@ -71,15 +72,15 @@ private extension ProxyManager {
/// Configures an iAP transport layer.
///
/// - Returns: A SDLConfiguration object
class func connectIAP() -> SDLConfiguration {
class var iapConfiguration: SDLConfiguration {
let lifecycleConfiguration = SDLLifecycleConfiguration(appName: ExampleAppName, fullAppId: ExampleFullAppId)
return setupManagerConfiguration(with: lifecycleConfiguration)
}

/// Configures a TCP transport layer with the IP address and port of the remote SDL Core instance.
///
/// - Returns: A SDLConfiguration object
class func connectTCP() -> SDLConfiguration {
class var tcpConfiguration: SDLConfiguration {
let lifecycleConfiguration = SDLLifecycleConfiguration(appName: ExampleAppName, fullAppId: ExampleFullAppId, ipAddress: AppUserDefaults.shared.ipAddress!, port: UInt16(AppUserDefaults.shared.port!)!)
return setupManagerConfiguration(with: lifecycleConfiguration)
}
Expand Down Expand Up @@ -287,12 +288,12 @@ private extension ProxyManager {

// Primary graphic
if imageFieldSupported(imageFieldName: .graphic) {
screenManager.primaryGraphic = areImagesVisible ? SDLArtwork(image: UIImage(named: ExampleAppLogoName)!.withRenderingMode(.alwaysOriginal), persistent: false, as: .PNG) : nil
screenManager.primaryGraphic = areImagesVisible ? SDLArtwork(image: UIImage(named: ExampleAppLogoName)!.withRenderingMode(.alwaysOriginal), persistent: true, as: .PNG) : nil
}

// Secondary graphic
if imageFieldSupported(imageFieldName: .secondaryGraphic) {
screenManager.secondaryGraphic = areImagesVisible ? SDLArtwork(image: UIImage(named: CarBWIconImageName)!, persistent: false, as: .PNG) : nil
screenManager.secondaryGraphic = areImagesVisible ? SDLArtwork(image: UIImage(named: CarBWIconImageName)!, persistent: true, as: .PNG) : nil
}

screenManager.endUpdates(completionHandler: { (error) in
Expand Down
2 changes: 1 addition & 1 deletion Example Apps/Example Swift/ProxyManagerDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import Foundation

protocol ProxyManagerDelegate: class {
protocol ProxyManagerDelegate: AnyObject {
var proxyState: ProxyState { get }

func didChangeProxyState(_ newState: ProxyState)
Expand Down
2 changes: 1 addition & 1 deletion SmartDeviceLink-iOS.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "SmartDeviceLink-iOS"
s.version = "7.1.1"
s.version = "7.2.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
Loading

0 comments on commit e05d613

Please sign in to comment.