Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
joeljfischer committed Jul 29, 2020
2 parents d86d5cd + 30f719d commit 9881ab9
Show file tree
Hide file tree
Showing 252 changed files with 10,882 additions and 7,258 deletions.
52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,56 @@
# Changelog
## 6.7.0
### Versions
* Supports [SDL RPC Spec 6.0.0](https://github.com/smartdevicelink/rpc_spec/releases/tag/6.0.0) and [SDL Protocol Spec 5.2.0](https://github.com/smartdevicelink/protocol_spec/releases/tag/5.2.0).

### Testing
* Tested with Xcode 11.6
* iOS 13.5 and 13.6
* Core:
* Manticore (Core v6.1.1, Generic HMI v0.8.1)
* Ford Sync 3.4 (19353_DEVTEST)
* Ford Sync 3.0 (17276_DEVTEST)
* Ford Sync 4.0 (20016_DEVTEST)
* Core v5.1.0 with sdl_hmi v5.2.0
* Core v6.1.1

### Enhancements
* Added subscribe button features to the screen manager (https://github.com/smartdevicelink/sdl_ios/issues/1563).
* Added a new `SDLManager` delegate method for updating the HMI and VR language separately (https://github.com/smartdevicelink/sdl_ios/issues/1593).
* Added a new initializer to `SDLButtonPress` because the existing ones were missing a mandatory parameter (https://github.com/smartdevicelink/sdl_ios/issues/1635).
* Aligned `SDLPermissionManager` methods with Java Suite and JavaScript Suite libraries, adding methods for parameter permissions and more (https://github.com/smartdevicelink/sdl_ios/issues/1661, https://github.com/smartdevicelink/sdl_ios/issues/1667, https://github.com/smartdevicelink/sdl_ios/issues/1682).

### Bug Fixes
* Fix the video background when the app goes into the background not always showing when it should (https://github.com/smartdevicelink/sdl_ios/issues/1620).
* Improved `SDLAudioStreamManager` error messages (https://github.com/smartdevicelink/sdl_ios/issues/1622).
* Better handling of head units sending a `nil` `displayCapabilities` in the `SystemCapabilityManager` (https://github.com/smartdevicelink/sdl_ios/issues/1623).
* Fixed a deadlock that could happen on the lock screen due to some calls being asynchronous but handled synchronously (https://github.com/smartdevicelink/sdl_ios/issues/1629).
* Stop and start `SDLFocusableItemLocator` when the video stream starts and stops (https://github.com/smartdevicelink/sdl_ios/issues/1631).
* Fixed turning wifi off and back on causing secondary transport to fail (https://github.com/smartdevicelink/sdl_ios/issues/1631, https://github.com/smartdevicelink/sdl_ios/issues/1639).
* Fixed using the permission manager in Swift would sometimes crash (https://github.com/smartdevicelink/sdl_ios/issues/1636).
* Fixed Travis tests failing and moved to Github Actions CI (https://github.com/smartdevicelink/sdl_ios/issues/1640, https://github.com/smartdevicelink/sdl_ios/issues/1642, https://github.com/smartdevicelink/sdl_ios/issues/1678).
* Fixed sending an empty VR array in an `SDLMenuCell` would fail (https://github.com/smartdevicelink/sdl_ios/issues/1648).
* Fix a launch app should only happen on the main thread (https://github.com/smartdevicelink/sdl_ios/issues/1662).
* Fixed some documentation for a permission manager method to be more specific (https://github.com/smartdevicelink/sdl_ios/issues/1665).
* Fix the encryption manager not being shut down correctly after a disconnect / reconnect (https://github.com/smartdevicelink/sdl_ios/issues/1675).
* Refactor the protocol layer and merge the proxy and lifecycle layers (https://github.com/smartdevicelink/sdl_ios/issues/1680).
* Fix video session properties not being re-set upon reconnection (https://github.com/smartdevicelink/sdl_ios/issues/1683).
* Fix soft button image uploads failing if the first state has no images but other states do (https://github.com/smartdevicelink/sdl_ios/issues/1698).
* Fix a potential race condition in `SystemCapabilityManager` (https://github.com/smartdevicelink/sdl_ios/issues/1709).
* Fix a deadlock that would occur when restarting the `SDLManager` in the `managerDidDisconnect` callback (https://github.com/smartdevicelink/sdl_ios/issues/1710).
* Fix a crash that would occur when receiving an unknown RPC (https://github.com/smartdevicelink/sdl_ios/issues/1713).
* Fix the secondary transport timer starting when a primary transport connects (https://github.com/smartdevicelink/sdl_ios/issues/1716).
* Fix protocol delegates not always receiving an `EndServiceNAK` (https://github.com/smartdevicelink/sdl_ios/issues/1718).

### Other
* Use an `NSTimer` wrapper everywhere internally instead of the raw `NSTimer` (https://github.com/smartdevicelink/sdl_ios/issues/1611).
* Add security manager tests to secondary transport unit tests (https://github.com/smartdevicelink/sdl_ios/issues/1653).
* Fixed documentation for permission manager subscribe callbacks (https://github.com/smartdevicelink/sdl_ios/issues/1724).

### Example Apps
* Add icons to example app vehicle data menus (https://github.com/smartdevicelink/sdl_ios/issues/1580).
* Fixed some small icons and replaced a few icons (https://github.com/smartdevicelink/sdl_ios/issues/1581).

## 6.6.0
### Versions
* Supports [SDL RPC Spec 6.0.0](https://github.com/smartdevicelink/rpc_spec/releases/tag/6.0.0) and [SDL Protocol Spec 5.2.0](https://github.com/smartdevicelink/protocol_spec/releases/tag/5.2.0).
Expand Down
2 changes: 1 addition & 1 deletion Example Apps/Example ObjC/MenuManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ + (SDLMenuCell *)sdlex_menuCellGetAllVehicleDataWithManager:(SDLManager *)manage
NSMutableArray *submenuItems = [[NSMutableArray alloc] init];
NSArray<NSString *> *allVehicleDataTypes = [self sdlex_allVehicleDataTypes];
for (NSString *vehicleDataType in allVehicleDataTypes) {
SDLMenuCell *cell = [[SDLMenuCell alloc] initWithTitle:vehicleDataType icon:nil voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) {
SDLMenuCell *cell = [[SDLMenuCell alloc] initWithTitle:vehicleDataType icon:[SDLArtwork artworkWithStaticIcon:SDLStaticIconNameSettings] voiceCommands:nil handler:^(SDLTriggerSource _Nonnull triggerSource) {
[VehicleDataManager getAllVehicleDataWithManager:manager triggerSource:triggerSource vehicleDataType:vehicleDataType];
}];
[submenuItems addObject:cell];
Expand Down
58 changes: 34 additions & 24 deletions Example Apps/Example ObjC/ProxyManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#import "ProxyManager.h"
#import "RPCPermissionsManager.h"
#import "SmartDeviceLink.h"
#import "SubscribeButtonManager.h"
#import "VehicleDataManager.h"

NS_ASSUME_NONNULL_BEGIN
Expand All @@ -24,6 +25,7 @@ @interface ProxyManager () <SDLManagerDelegate>
@property (strong, nonatomic) VehicleDataManager *vehicleDataManager;
@property (strong, nonatomic) PerformInteractionManager *performManager;
@property (strong, nonatomic) ButtonManager *buttonManager;
@property (strong, nonatomic) SubscribeButtonManager *subscribeButtonManager;
@property (nonatomic, copy, nullable) RefreshUIHandler refreshUIHandler;
@end

Expand Down Expand Up @@ -66,6 +68,7 @@ - (void)sdlex_startManager {
self.vehicleDataManager = [[VehicleDataManager alloc] initWithManager:self.sdlManager refreshUIHandler:self.refreshUIHandler];
self.performManager = [[PerformInteractionManager alloc] initWithManager:self.sdlManager];
self.buttonManager = [[ButtonManager alloc] initWithManager:self.sdlManager refreshUIHandler:self.refreshUIHandler];
self.subscribeButtonManager = [[SubscribeButtonManager alloc] initWithManager:self.sdlManager];

[weakSelf sdlex_updateProxyState:ProxyStateConnected];
[RPCPermissionsManager setupPermissionsCallbacksWithManager:weakSelf.sdlManager];
Expand Down Expand Up @@ -145,7 +148,7 @@ + (SDLLifecycleConfiguration *)sdlex_setLifecycleConfigurationPropertiesOnConfig

+ (SDLLogConfiguration *)sdlex_logConfiguration {
SDLLogConfiguration *logConfig = [SDLLogConfiguration debugConfiguration];
SDLLogFileModule *sdlExampleModule = [SDLLogFileModule moduleWithName:@"SDL Obj-C Example App" files:[NSSet setWithArray:@[@"ProxyManager", @"AlertManager", @"AudioManager", @"ButtonManager", @"MenuManager", @"PerformInteractionManager", @"RPCPermissionsManager", @"VehicleDataManager"]]];
SDLLogFileModule *sdlExampleModule = [SDLLogFileModule moduleWithName:@"SDL Obj-C Example App" files:[NSSet setWithArray:@[@"ProxyManager", @"AlertManager", @"AudioManager", @"ButtonManager", @"SubscribeButtonManager", @"MenuManager", @"PerformInteractionManager", @"RPCPermissionsManager", @"VehicleDataManager"]]];
logConfig.modules = [logConfig.modules setByAddingObject:sdlExampleModule];
logConfig.targets = [logConfig.targets setByAddingObject:[SDLLogTargetFile logger]];
logConfig.globalLogLevel = SDLLogLevelDebug;
Expand Down Expand Up @@ -225,6 +228,7 @@ - (BOOL)sdlex_imageFieldSupported:(SDLImageFieldName)imageFieldName {

#pragma mark - SDLManagerDelegate

/// Called when the connection beween this app and the module has closed.
- (void)managerDidDisconnect {
if (self.state != ProxyStateStopped) {
[self sdlex_updateProxyState:ProxyStateSearchingForConnection];
Expand All @@ -233,77 +237,83 @@ - (void)managerDidDisconnect {
self.firstHMILevel = SDLHMILevelNone;
}

/// 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.
/// @param oldLevel The old HMI Level
/// @param newLevel The new HMI Level
- (void)hmiLevel:(SDLHMILevel)oldLevel didChangeToLevel:(SDLHMILevel)newLevel {
if (![newLevel isEqualToEnum:SDLHMILevelNone] && ([self.firstHMILevel isEqualToEnum:SDLHMILevelNone])) {
// This is our first time in a non-NONE state
self.firstHMILevel = newLevel;

// Send AddCommands
// Send static menu items.
[self sdlex_createMenus];

// Subscribe to vehicle data.
[self.vehicleDataManager subscribeToVehicleOdometer];
}

if ([newLevel isEqualToEnum:SDLHMILevelFull]) {
// The SDL app is in the foreground
SDLLogD(@"The HMI level is full");
// The SDL app is in the foreground. Always try to show the initial state to guard against some possible weird states. Duplicates will be ignored by Core.
[self sdlex_showInitialData];
[self.subscribeButtonManager subscribeToAllPresetButtons];
} else if ([newLevel isEqualToEnum:SDLHMILevelLimited]) {
// An active NAV or MEDIA SDL app is in the background
SDLLogD(@"The HMI level is limited");
} else if ([newLevel isEqualToEnum:SDLHMILevelBackground]) {
// The SDL app is not in the foreground
SDLLogD(@"The HMI level is background");
} else if ([newLevel isEqualToEnum:SDLHMILevelNone]) {
// The SDL app is not yet running
SDLLogD(@"The HMI level is none");
}

if ([newLevel isEqualToEnum:SDLHMILevelFull]) {
// We're always going to try to show the initial state. because if we've already shown it, it won't be shown, and we need to guard against some possible weird states
[self sdlex_showInitialData];
}
}

/// Called when the SDL app's HMI context changes.
/// @param oldContext The old HMI context
/// @param newContext The new HMI context
- (void)systemContext:(nullable SDLSystemContext)oldContext didChangeToContext:(SDLSystemContext)newContext {
if ([newContext isEqualToEnum:SDLSystemContextAlert]) {
SDLLogD(@"The System Context is Alert");
// The SDL app's screen is obscured by an alert
} else if ([newContext isEqualToEnum:SDLSystemContextHMIObscured]) {
SDLLogD(@"The System Context is HMI Obscured");
// The SDL app's screen is obscured
} else if ([newContext isEqualToEnum:SDLSystemContextMain]) {
SDLLogD(@"The System Context is Main");
// The SDL app's main screen is open
} else if ([newContext isEqualToEnum:SDLSystemContextMenu]) {
SDLLogD(@"The System Context is Menu");
// The SDL app's menu is open
} else if ([newContext isEqualToEnum:SDLSystemContextVoiceRecognitionSession]) {
SDLLogD(@"The System Context is Voice Recognition Session");
// A voice recognition session is in progress
}
}

/// Called when the audio state of the SDL app has changed. The audio state only needs to be monitored if the app is streaming audio.
/// @param oldState The old audio streaming state
/// @param newState The new audio streaming state
- (void)audioStreamingState:(nullable SDLAudioStreamingState)oldState didChangeToState:(SDLAudioStreamingState)newState {
if ([newState isEqualToEnum:SDLAudioStreamingStateAudible]) {
// The SDL app's audio can be heard
SDLLogD(@"The Audio Streaming State is Audible");
} else if ([newState isEqualToEnum:SDLAudioStreamingStateNotAudible]) {
// The SDL app's audio cannot be heard
SDLLogD(@"The Audio Streaming State is Not Audible");
} else if ([newState isEqualToEnum:SDLAudioStreamingStateAttenuated]) {
// The SDL app's audio volume has been lowered to let the system speak over the audio. This usually happens with voice recognition commands.
SDLLogD(@"The Audio Streaming State is Not Attenuated");
}
}

- (nullable SDLLifecycleConfigurationUpdate *)managerShouldUpdateLifecycleToLanguage:(SDLLanguage)language {
/// Called when the car's head unit language is different from the default langage set in the SDLConfiguration AND the head unit language is supported by the app (as set in `languagesSupported` of SDLConfiguration). This method is only called when a connection to Core is first established. If desired, you can update the app's name and text-to-speech name to reflect the head unit's language.
/// @param language The head unit's current VR+TTS language
/// @param hmiLanguage The head unit's current HMI language
/// @return A SDLLifecycleConfigurationUpdate object
- (nullable SDLLifecycleConfigurationUpdate *)managerShouldUpdateLifecycleToLanguage:(SDLLanguage)language hmiLanguage:(SDLLanguage)hmiLanguage {
SDLLifecycleConfigurationUpdate *update = [[SDLLifecycleConfigurationUpdate alloc] init];

if ([language isEqualToEnum:SDLLanguageEnUs]) {
if ([hmiLanguage isEqualToEnum:SDLLanguageEnUs]) {
update.appName = ExampleAppName;
} else if ([language isEqualToString:SDLLanguageEsMx]) {
} else if ([hmiLanguage isEqualToEnum:SDLLanguageEsMx]) {
update.appName = ExampleAppNameSpanish;
} else if ([language isEqualToString:SDLLanguageFrCa]) {
} else if ([hmiLanguage isEqualToEnum:SDLLanguageFrCa]) {
update.appName = ExampleAppNameFrench;
} else {
return nil;
}

update.ttsName = [SDLTTSChunk textChunksFromString:update.appName];

return update;
}

Expand Down
Loading

0 comments on commit 9881ab9

Please sign in to comment.