I had implemented listTemplate(_:didSelect:completionHandler:) of CPListTemplateDelegate protocol.
But the API was changed on Xcode 12:
https://developer.apple.com/documentation/carplay/cplisttemplatedelegate/2977578-listtemplate?changes=latest_minor
So I changed the new API and ran my app on iOS 14.
It was successful, but it was crashed below iOS 14.
The error message was the following:
listTemplate's availability is iOS 12+, but CPBaseListItem's availability is iOS 14.0+.
https://developer.apple.com/documentation/carplay/cplisttemplatedelegate/2977578-listtemplate?changes=latest_minor
https://developer.apple.com/documentation/carplay/cplistitem
Is it a bug? (Xcode 12 beta 4)
Code Block swift func listTemplate(_ listTemplate: CPListTemplate, didSelect item: CPListItem, completionHandler: @escaping () -> Void) { }
But the API was changed on Xcode 12:
Code Block swift func listTemplate(_ listTemplate: CPListTemplate, didSelect item: CPBaseListItem, completionHandler: @escaping () -> Void) { }
https://developer.apple.com/documentation/carplay/cplisttemplatedelegate/2977578-listtemplate?changes=latest_minor
So I changed the new API and ran my app on iOS 14.
It was successful, but it was crashed below iOS 14.
The error message was the following:
Code Block dyld: Symbol not found: _OBJC_CLASS_$_CPBaseListItem Referenced from: /Users/**/Library/Developer/CoreSimulator/Devices/**/MyApp.app/MyApp Expected in: /System/Library/Frameworks/CarPlay.framework/CarPlay
listTemplate's availability is iOS 12+, but CPBaseListItem's availability is iOS 14.0+.
https://developer.apple.com/documentation/carplay/cplisttemplatedelegate/2977578-listtemplate?changes=latest_minor
https://developer.apple.com/documentation/carplay/cplistitem
Is it a bug? (Xcode 12 beta 4)