An example of using the CarPlay framework in iOS 12 and later.
An example of using the CarPlay framework in iOS 12 and later.
This sample project uses the CarPlay
framework to start a simple navigation session
from your existing project. It utilizes the CPApplicationDelegate
to connect to your
car, CPInterfaceController
to attach your view controller and CPMapTemplate
to show
and example template as part of the "root template" of the controller.
Some general hints I have noticed so far:
CPApplicationDelegate
delegate that inherits from the
UIApplicationDelegate
, so you usually handle it as part of your main app-delegate class.UserDefaults
and grab it for my CarPlay connection once ready.Let me know if you have further questions! As of for now, this is a tiny example to get your head around the whole framework, but it can be extended to show other template types like lists, grids and UI elements like alerts and notifications.
Hans Knöchel (@hansemannnn / Web)
MIT
Code contributions are greatly appreciated, please submit a new Pull-Request!