Repository navigation
Removing CarPlayManager shared instance - #1792
Conversation
…erty. Co-authored-by: Jerrad Thramer <[email protected]> Co-authored-by: Vincent Sam <[email protected]>
Co-authored-by: Jerrad Thramer <[email protected]> Co-authored-by: Vincent Sam <[email protected]>
| #if canImport(MapboxGeocoder) | ||
| func carPlayManager(_ carPlayManager: CarPlayManager, searchTemplate: CPSearchTemplate, updatedSearchText searchText: String, completionHandler: @escaping ([CPListItem]) -> Void) { | ||
| return CarPlayManager.searchTemplate(searchTemplate, updatedSearchText: searchText, completionHandler: completionHandler) | ||
| return CarPlayManager.searchTemplate(carPlayManager, searchTemplate: searchTemplate, updatedSearchText: searchText, completionHandler: completionHandler) |
There was a problem hiding this comment.
There is a pretty significant indication here that this should be an instance method on the carPlayManager itself
akitchen
left a comment
There was a problem hiding this comment.
Please consider converting the search template functionality to instance methods as a part of this. Note, this will be a breaking change in our search template functionality. /cc @mapbox/navigation-ios
| let navigationViewController = CarPlayNavigationViewController(with: service, | ||
| mapTemplate: navigationMapTemplate, | ||
| interfaceController: interfaceController) | ||
| interfaceController: interfaceController, manager: self) |
There was a problem hiding this comment.
Newline for the manager argument.
…lementations. Co-authored-by: Jerrad Thramer <[email protected]> Co-authored-by: Vincent Sam <[email protected]>
…ntroduces breaking side-effects
…legate when iOS version is lower than 12.0. Added missing CoreLocation module missing when running app on iOS device with an iOS version prior to version 12.0.
|
|
||
|
|
||
| /** | ||
| The most recently selected search results. |
There was a problem hiding this comment.
nit: documentation doesn't correspond to the property
| You do not create instances of this object yourself; instead, use the `CarPlayManager.shared` class property. | ||
|
|
||
| Messages declared in the `CPApplicationDelegate` protocol should be sent to this object in the containing application's application delegate. Implement `CarPlayManagerDelegate` in the containing application and assign an instance to the `delegate` property of the `CarPlayManager` shared instance. | ||
| Messages declared in the `CPApplicationDelegate` protocol should be sent to this object in the containing application's application delegate. Implement `CarPlayManagerDelegate` in the containing application and assign an instance to the `delegate` property of your `CarPlayManager` instance. |
There was a problem hiding this comment.
We should probably note that the application should only have a single CarPlayManager instance at any given time. Effectively a singleton, but managed by the application instead of the SDK, to get around the access token problem.
… single CarPlayManager instance.
| @@ -1,5 +1,5 @@ | |||
| binary "https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json" "4.5.0" | |||
| binary "https://www.mapbox.com/ios-sdk/MapboxNavigationNative.json" "3.1.5" | |||
| binary "https://www.mapbox.com/ios-sdk/MapboxNavigationNative.json" "3.2.0" | |||
There was a problem hiding this comment.
I think you'll get a failure on CI if you bump the MapboxNavigationNative to 3.2.0 in MapboxCoreNavigation.podspec. Don't forget to run pod update --repo update from MapboxCoreNavigationTests/CocoaPodsTest/PodInstall after you've changed the podspec.
There was a problem hiding this comment.
@frederoni changes made in this commit ✅
In efforts to address current issues associated with the
CarPlayManager.sharedsingleton, this branch provides an app delegateCarPlayManagerproperty which could contain any additional information such aEventsManagerif necessary./cc @akitchen @frederoni @1ec5
TODO:
CarPlayManager.