Hello,
I've been banging my head against this for a couple of days now
I can't get the CarPlay interface to work on my music app
I see the error: Application does not implement CarPlay template application lifecycle methods in its scene delegate
I've checked the sample code and developer guides and can't see my mistake
My CarPlay delegate code is:
class CarPlaySceneDelegate: UIResponder, CPTemplateApplicationSceneDelegate {
var interfaceController: CPInterfaceController?
var carPlayWindow: UIWindow?
private let playerManager = MusicPlayerManager.shared
private var playlists: MusicItemCollection<Playlist> = []
// MARK: - CPTemplateApplicationSceneDelegate Methods
func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene,
didConnect interfaceController: CPInterfaceController) {
// Store reference to the interface controller to use throughout the app
self.interfaceController = interfaceController
// Request Apple Music authorization if needed
requestMusicAuthorization()
// Configure the interface with the now playing template and specified tabs
setupCarPlayInterface(interfaceController)
}
func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene,
didDisconnectInterfaceController interfaceController: CPInterfaceController) {
// Clean up when CarPlay disconnects
self.interfaceController = nil
print("CarPlay disconnected")
}
func sceneDidBecomeActive(_ scene: UIScene) {
// Called when the scene has moved from an inactive state to an active state
print("CarPlay scene became active")
}
etc
My info.plist contains:
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<true/>
<key>UISceneConfigurations</key>
<dict>
<key>CPTemplateApplicationSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>CPTemplateApplicationScene</string>
<key>UISceneConfigurationName</key>
<string>TemplateSceneConfiguration</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).CarPlaySceneDelegate</string>
</dict>
</array>
</dict>
</dict>
My one doubt is this entry in the plist: UISceneConfigurationName as I can't find any clarity in the docs how to use or implement this
Can anyone suggest where I need to be looking?
Thanks for your help!
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi,
I'm trying to implement WeatherKit for the first time and I am seeing this error when calling for the weather:
Failed to generate jwt token for: com.apple.weatherkit.authservice with error: Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 "(null)"
and
Encountered an error when fetching weather data subset; location=<+51.57750785,-2.08241362> +/- 6.55m (speed -1.00 mps / course -1.00) @ 11/01/2025, 11:50:45 Greenwich Mean Time, error=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors 2 Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 "(null)"
I have:
Enabled the WeatherKit capability in my iOS app in XCode
Added Weatherkit to the AppID in the developer portal
Any suggestions what else I can check?
I'm running iOS 18.2.1 on 15 ProMax with XCode 16.2