Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

v7.2.0 Release #2007

Merged
merged 192 commits into from
Jun 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
192 commits
Select commit Hold shift + click to select a range
1aba24a
Object equality funcs added to SDLVoiceCommand
FrankElias77 Mar 31, 2021
42e3440
SDLVoiceCommandManager update
FrankElias77 Mar 31, 2021
b1313ae
SDLVoiceCommandUpdateOperation update
FrankElias77 Apr 6, 2021
63faa70
Fix for having 2 voiceCommands with same string
FrankElias77 Apr 6, 2021
f918655
Fix to reduce same string in voiceCommand
FrankElias77 Apr 7, 2021
e742cc6
spec file update
FrankElias77 Apr 7, 2021
fcc2f71
Comments review
FrankElias77 Apr 7, 2021
e0d50c8
Test fix
FrankElias77 Apr 7, 2021
e6b881e
SDLVoiceCommandManagerSpec fix
FrankElias77 Apr 7, 2021
59d6db5
Spec file fix
FrankElias77 Apr 7, 2021
5672dd3
Spec files update
FrankElias77 Apr 8, 2021
16f9354
SDLVoiceCommandSpec update
FrankElias77 Apr 8, 2021
7c90856
Test update
FrankElias77 Apr 8, 2021
d3ae556
Possible solution
FrankElias77 Apr 8, 2021
fcbc015
Remove empty voice Commands
FrankElias77 Apr 8, 2021
4d21bb3
Spec file update
FrankElias77 Apr 9, 2021
28335a9
sdl_removeEmptyVoiceCommands update
FrankElias77 Apr 13, 2021
ab9ba27
Code update
FrankElias77 Apr 15, 2021
2ce88ed
Spec files update
FrankElias77 Apr 15, 2021
b20c0c2
Comments review
FrankElias77 Apr 15, 2021
2f50be1
Merge branch 'develop' into bugfix/issue-1961-send-voiceCommand-with-…
joeljfischer Apr 16, 2021
0c9e72b
Comments review
FrankElias77 Apr 20, 2021
f6750c1
Merge pull request #1963 from smartdevicelink/bugfix/issue-1961-send-…
joeljfischer Apr 20, 2021
595e51c
SDLVoiceCommandUpdateOperationSpec update
FrankElias77 Apr 20, 2021
59dd198
Comments review
FrankElias77 Apr 21, 2021
0c355ca
Spec file update
FrankElias77 Apr 21, 2021
281969e
Comments review
FrankElias77 Apr 23, 2021
cf2e16f
Comments review
FrankElias77 Apr 23, 2021
8083b42
Comments review
FrankElias77 Apr 26, 2021
618294f
Comments review
FrankElias77 Apr 27, 2021
58eae97
Merge branch 'hotfix/7.1.1' into develop
joeljfischer Apr 28, 2021
a7ad262
Comments review
FrankElias77 Apr 28, 2021
8376ab0
re-upload image when there is error
FrankElias77 Apr 29, 2021
9975554
Comments review
FrankElias77 May 4, 2021
5ffb7f8
Comments review
FrankElias77 May 4, 2021
4ee1e34
Spec file update
FrankElias77 May 4, 2021
da466f7
Comments review
FrankElias77 May 4, 2021
ef56bf7
Code update
FrankElias77 May 4, 2021
0c561eb
VoiceCommandUpdateOperation update
FrankElias77 May 5, 2021
2c82d6e
Spec file update
FrankElias77 May 5, 2021
f794485
Relocate comment
FrankElias77 May 5, 2021
e388825
Implement custom text field subclass to allow canBecomeFocused tests …
joeljfischer May 5, 2021
b5cb8f1
Fix focused test
joeljfischer May 5, 2021
e652c00
Merge pull request #1983 from smartdevicelink/bugfix/issue-1982-hapti…
joeljfischer May 6, 2021
af93c9f
Comments review
FrankElias77 May 6, 2021
38a53ba
Spec file update
FrankElias77 May 6, 2021
6c17f30
Comments review
FrankElias77 May 6, 2021
d2b8d0a
Comments review
FrankElias77 May 7, 2021
dfa3f37
Spec file update
FrankElias77 May 7, 2021
728302a
Example app updare
FrankElias77 May 10, 2021
923ad68
SDLFileManager update
FrankElias77 May 10, 2021
c530fe1
Comments review
FrankElias77 May 10, 2021
c166c8f
Spec files added to target
FrankElias77 May 10, 2021
1b2c80b
NSMutableDictionary_StoreSpec update
FrankElias77 May 10, 2021
6ad14a7
Objc example app update
FrankElias77 May 10, 2021
c943104
Fixed cancelId tests
NicoleYarroch May 11, 2021
9ec7026
Fixed searchable PI tests
NicoleYarroch May 11, 2021
ee155ac
Spec file update
FrankElias77 May 11, 2021
2392569
SDLVoiceCommandUpdateOperationSpec update
FrankElias77 May 11, 2021
f3eaeb7
Fixed non/searchable PI tests
NicoleYarroch May 11, 2021
42b7b1f
Merge pull request #1986 from smartdevicelink/bugfix/issue-1985-add-m…
joeljfischer May 11, 2021
9773a68
Fixed mocked operation queue breaking other tests
NicoleYarroch May 11, 2021
540896d
Comments review
FrankElias77 May 11, 2021
6a9ed73
Swift example app update
FrankElias77 May 11, 2021
007e4e0
Fixed shutdown during presentation tests
NicoleYarroch May 11, 2021
bc5eac6
Fixed presentation of choice set
NicoleYarroch May 11, 2021
5a33100
Update SCM to workaround Sync 3 bug with media capabilities
joeljfischer May 11, 2021
7b9a25a
Fix broken tests
joeljfischer May 11, 2021
c560323
Add LifecycleManagerSpec updates
joeljfischer May 11, 2021
7d7027f
Update SystemCapabilityManagerSpec
joeljfischer May 12, 2021
4fefe3e
Fixed warnings
FrankElias77 May 12, 2021
e97571f
SDLFileManagerSpec update
FrankElias77 May 12, 2021
51c6b27
Comments review
FrankElias77 May 12, 2021
161bd65
Merge pull request #1989 from smartdevicelink/bugfix/issue-1988-fix-p…
joeljfischer May 13, 2021
7f04afd
Refactor Obj-C example app connection process to mirror Swift ap
joeljfischer May 13, 2021
4939d0b
Fix swift example warning
joeljfischer May 13, 2021
cef7e02
Fix updating window capabilities from deprecated displayCapabilities
joeljfischer May 13, 2021
741515b
SDLFileManagerSpec update
FrankElias77 May 13, 2021
aae30ce
Tests update
FrankElias77 May 13, 2021
b88b7d1
Button state fix
FrankElias77 May 14, 2021
8d85db3
Fixed keyboard dismissal tests
NicoleYarroch May 17, 2021
9c64c1d
Merge pull request #1990 from smartdevicelink/bugfix/issue-1984-tcp-r…
joeljfischer May 17, 2021
ba91ad9
Objc example app update
FrankElias77 May 17, 2021
53fe3f4
Swift example app update
FrankElias77 May 17, 2021
1f7510c
Comments review
FrankElias77 May 17, 2021
5a21104
Merge pull request #1992 from smartdevicelink/bugfix/issue-1991-examp…
joeljfischer May 17, 2021
6c42ba3
Possible fix for sdl_ios issue-1994: Flipper integration causes build…
shiniwat May 21, 2021
6bbc898
Merge pull request #1960 from smartdevicelink/bugfix/issue-1959-two-v…
joeljfischer May 24, 2021
6e3205a
Merge branch 'master' into develop
joeljfischer May 24, 2021
f7a0e00
Merge branch 'develop' into bugfix/issue-1964-voiceCommand-that-conta…
FrankElias77 May 24, 2021
d14b96a
App alignment
FrankElias77 May 25, 2021
0778f2d
race condition fix
FrankElias77 May 25, 2021
57de541
Merge pull request #1965 from smartdevicelink/bugfix/issue-1964-voice…
joeljfischer May 25, 2021
898200b
Added non-media
FrankElias77 May 25, 2021
b89fee2
SDLSystemCapabilityManager update
FrankElias77 May 25, 2021
8d5da43
Spec file update
FrankElias77 May 25, 2021
1e7a2df
Comments review
FrankElias77 May 25, 2021
464e3e9
Merge pull request #1987 from smartdevicelink/bugfix/issue-1152-prima…
joeljfischer May 25, 2021
3147433
In progress menu manager uniqueness updates
joeljfischer May 25, 2021
240093c
Merge branch 'develop' into bugfix/issue-1940-uniqueness-fixes
joeljfischer May 25, 2021
5668b41
Merge branch 'develop' into bugfix/issue-1999-sdlpredefinedlayoutnonm…
FrankElias77 May 25, 2021
b1339ea
Merge pull request #1979 from smartdevicelink/bugfix/issue-1978-swift…
joeljfischer May 25, 2021
e1785f7
Merge pull request #1998 from smartdevicelink/bugfix/issue-1996-Race-…
joeljfischer May 26, 2021
62af967
Cancel operation update
FrankElias77 May 26, 2021
eb76e1e
Continue menu uniqueness checks
joeljfischer May 26, 2021
6cf628e
Added failed choice set tests
NicoleYarroch May 26, 2021
ec8b666
Merge branch 'develop' into bugfix/issue-1940-uniqueness-fixes
joeljfischer May 26, 2021
0a55970
Added missing docs
NicoleYarroch May 26, 2021
d5f2ba9
Added generics
NicoleYarroch May 26, 2021
434fb78
Comments review
FrankElias77 May 26, 2021
4f7d90d
Comments review
FrankElias77 May 26, 2021
1d2c2ba
Comments review
FrankElias77 May 26, 2021
3c77719
Added comment
FrankElias77 May 26, 2021
e9cc9c5
Spec file update
FrankElias77 May 26, 2021
e30313f
Simplify some code
joeljfischer May 27, 2021
fd6569a
Improve description method of SDLMenuCell
joeljfischer May 27, 2021
55c922b
Fix stripping correct information
joeljfischer May 27, 2021
c801ce0
Minor updates to menu manager comments
joeljfischer May 27, 2021
9334b1c
Add readwrite properties to choices
joeljfischer May 27, 2021
38a0386
Merge branch 'develop' into bugfix/issue-1855-avoid-deleting-and-sett…
FrankElias77 May 27, 2021
9d591a1
Fix wrong recursive call
joeljfischer May 27, 2021
c8c8b70
First pass attempt at choice uniqueness fixes
joeljfischer May 27, 2021
c8df8bb
Comments review
FrankElias77 May 27, 2021
079aeae
Rename a property to conform with function name
joeljfischer May 27, 2021
1564ca8
Testing github checks
FrankElias77 May 27, 2021
e92d29c
Spec file update
FrankElias77 May 27, 2021
b819dc4
Check update
FrankElias77 May 28, 2021
30e6524
Fix menu cell copy not copying subcells
joeljfischer May 28, 2021
e83059e
Fix stripping properties from menu subcells not being applied
joeljfischer May 28, 2021
4db64d8
Add menu manager tests
joeljfischer May 28, 2021
a4ed5c9
Add choice set manager tests
joeljfischer May 28, 2021
68084fc
Comments review
FrankElias77 May 28, 2021
54cd35f
Pending ops updated with failed choice uploads
NicoleYarroch Jun 1, 2021
159c021
Fixed failing tests
NicoleYarroch Jun 1, 2021
1d09aae
Tests added for +/- choices from op
NicoleYarroch Jun 1, 2021
6ef7afd
Added tests for updating preloading op choices
NicoleYarroch Jun 1, 2021
e0a15d1
If raw data fails to encrypt, don't send the protocol message
joeljfischer Jun 1, 2021
4c30d8e
Added tests for failed choice ids
NicoleYarroch Jun 1, 2021
7e83c69
Removed lazy init
NicoleYarroch Jun 2, 2021
c700e76
Removed check for count
NicoleYarroch Jun 2, 2021
e3449b9
Fixed var name
NicoleYarroch Jun 2, 2021
5ce4258
Fix some tests
joeljfischer Jun 2, 2021
f631969
Spec file update
FrankElias77 Jun 2, 2021
0fc6d7d
Added check for failed choice uploads
NicoleYarroch Jun 2, 2021
e0c6c86
Fix encrypted start service never sends a payload
joeljfischer Jun 2, 2021
e410e1b
Comments review
FrankElias77 Jun 2, 2021
3ee5bbf
SDLVoiceCommandUpdateOperation update
FrankElias77 Jun 2, 2021
546b55f
Removed updates to preload choices
NicoleYarroch Jun 2, 2021
9a51e8f
Removed upload check
NicoleYarroch Jun 2, 2021
fd39030
Fix choice set tests
joeljfischer Jun 2, 2021
af2b56c
Code update
FrankElias77 Jun 2, 2021
bce26b4
Code enhancement based on review
FrankElias77 Jun 3, 2021
60061c6
Apply suggestions from code review
NicoleYarroch Jun 3, 2021
af8e69a
Fixed how items are added
NicoleYarroch Jun 3, 2021
b4da304
Merge pull request #2005 from smartdevicelink/bugfix/issue-1830-faile…
joeljfischer Jun 3, 2021
ecf53ba
Merge pull request #1956 from smartdevicelink/bugfix/issue-1855-avoid…
joeljfischer Jun 3, 2021
9e19208
Added order matter expectation to tests
NicoleYarroch Jun 3, 2021
ae58436
Removed unecessary test settings
NicoleYarroch Jun 3, 2021
6ba82a8
Added shutdown tests
NicoleYarroch Jun 4, 2021
81786b6
Merge pull request #2000 from smartdevicelink/bugfix/issue-1999-sdlpr…
joeljfischer Jun 4, 2021
a3fa94a
Merge branch 'develop' into bugfix/issue_1941_failed_preload_choice_n…
joeljfischer Jun 4, 2021
c76bbe1
Merge pull request #2004 from smartdevicelink/bugfix/issue_1941_faile…
joeljfischer Jun 4, 2021
d83bd58
SDLVoiceCommandManager update
FrankElias77 Jun 4, 2021
b32d304
Spec file update
FrankElias77 Jun 4, 2021
59c526c
Merge branch 'develop' into bugfix/issue-1940-uniqueness-fixes
joeljfischer Jun 4, 2021
3fd3973
Fixed timing issue with shutdown test
NicoleYarroch Jun 4, 2021
20f0a45
Merge pull request #2003 from smartdevicelink/bugfix/issue-1940-uniqu…
joeljfischer Jun 4, 2021
bf92874
Spec file update
FrankElias77 Jun 7, 2021
91c02e0
github action test
FrankElias77 Jun 7, 2021
2e3d65c
Update bson branch for testing
joeljfischer Jun 8, 2021
9caa681
Update for v7.2.0-rc.1
joeljfischer Jun 8, 2021
f051c7f
github action test
FrankElias77 Jun 8, 2021
d65949a
Github action test
FrankElias77 Jun 8, 2021
327302c
Fix SPM import error
joeljfischer Jun 9, 2021
9fc30fc
Same as last commit
joeljfischer Jun 9, 2021
84fad33
Same as above
joeljfischer Jun 9, 2021
8ccebaa
Numerous fixes to SDLVideoStreamingRange
joeljfischer Jun 21, 2021
a64dbc0
Remove unused method
joeljfischer Jun 23, 2021
4b5b6d0
Comments review
FrankElias77 Jun 23, 2021
aee01a1
Test description update
FrankElias77 Jun 23, 2021
aa49ebe
Merge pull request #1995 from XevoInc/fix/issue-1994
joeljfischer Jun 23, 2021
01e22c6
Merge pull request #2002 from smartdevicelink/bugfix/issue-2001-rando…
joeljfischer Jun 23, 2021
1497e1a
Fix missing expectations
joeljfischer Jun 23, 2021
4c27cf8
Fix video streaming range tests
joeljfischer Jun 24, 2021
c3af93d
Merge branch 'develop' into bugfix/issue-2011-fix-sdlvideostreamingrange
joeljfischer Jun 24, 2021
29bb96a
Merge pull request #2012 from smartdevicelink/bugfix/issue-2011-fix-s…
joeljfischer Jun 24, 2021
f1b64fa
SDLMenuManager update
FrankElias77 Jun 25, 2021
b6e8587
SDLMenuManagerSepc update
FrankElias77 Jun 28, 2021
6f7c0fa
Spec file description update
FrankElias77 Jun 28, 2021
c8214e0
Merge pull request #2014 from smartdevicelink/bugfix/issue-2006-menu-…
joeljfischer Jun 28, 2021
44f7942
Version 7.2.0 update
FrankElias77 Jun 30, 2021
4f9c459
Comments review
FrankElias77 Jun 30, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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