It’s been about 10 years since I last worked with iOS. I was experimenting with using an API to check if the user has CarPlay open, but the solution I found depends on UIKit, specifically UIScreen.
Is it possible to add UIKit to my project, or could I do this with SwiftUI?
UIScreen.main.traitCollection.userInterfaceIdiom == .carPlay