-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement support for CPTemplateApplicationSceneDelegate UIScene-based CarPlay on iOS 13 and above #2832
Conversation
The initial version of the PR adds the Nav SDK support. I'm putting it up as a draft PR to get comments before doing all the work to convert the Example app to use UIScene templates for CarPlay. |
Added UIScene and CPTemplateApplicationSceneDelegate support to the Example app for iOS 13 and above. Allows us to use newer iOS 13 CarPlay SDK. |
1123295
to
4632205
Compare
@@ -901,7 +901,7 @@ | |||
C53C19751F38EADE008DB406 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = "<group>"; }; | |||
C53C19771F38EAE4008DB406 /* ca */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/Localizable.strings; sourceTree = "<group>"; }; | |||
C53C197A1F38EAEA008DB406 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = "<group>"; }; | |||
C53F2F0720EBC95600D9798F /* Example-CarPlay.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Example-CarPlay.app"; sourceTree = BUILT_PRODUCTS_DIR; }; | |||
C53F2F0720EBC95600D9798F /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By the way, this means it isn’t possible to install the normal Example and CarPlay-enabled Example applications simultaneously on a single device or simulator. Not a huge deal, but it may be surprising at first.
/** | ||
CarPlay support requires iOS 12.0 or above and the CarPlay framework. | ||
*/ | ||
public class CarPlayManager: NSObject { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally, jazzy will stop warning about missing USRs for these conditionally compiled symbols. 😌
/ref #2078
…ors for iOS 12 CarPlay UI.
…mple app for iOS 13 and above.
….swift file. Change target name for CarPlay app to Example_CarPlay so UIScene manifest entry in Info.plist can find the AppDelegate class name for both app targets.
008d3a5
to
7c35d5d
Compare
Made the change to the CHANGELOG entry as requested and rebased to |
…d CarPlay on iOS 13 and above (#2832) * Add support for UIScene-based CarPlay API.
…d CarPlay on iOS 13 and above (#2832) * Add support for UIScene-based CarPlay API.
…d CarPlay on iOS 13 and above (#2832) * Add support for UIScene-based CarPlay API.
…d CarPlay on iOS 13 and above (#2832) * Add support for UIScene-based CarPlay API.
…d CarPlay on iOS 13 and above (#2832) * Add support for UIScene-based CarPlay API.
Description
In iOS 13 Apple added a Template-based mechanism for providing CarPlay support to apps. The Nav SDK needs to include support for these newer APIs while ensuring we don't break the earlier iOS 12 CarPlay delegate pattern until we drop support for iOS 12.
Fixes #2260
Implementation
The changes required within the Nav SDK are fairly minimal, mainly adding conformance to the CPTemplateApplicationSceneDelegate protocol. More extensive changes are needed to the Example app in order to adopt UIScene support.