Adding CarPlay support for audio app below iOS14

I am Trying to build a audio app which supports from iOS 13 and above. iOS 13 - com.apple.developer.playable-content, iOS 14 - com.apple.developer.carplay-audio I have added above entitlements to support my app for below and above iOS 14 version.

	<key>UIApplicationSceneManifest</key>
	<dict>
		<key>UIApplicationSupportsMultipleScenes</key>
		<false/>
		<key>UISceneConfigurations</key>
		<dict>
			<key>CPTemplateApplicationSceneSessionRoleApplication</key>
			<array>
				<dict>
					<key>UISceneClassName</key>
					<string>CPTemplateApplicationScene</string>
					<key>UISceneConfigurationName</key>
					<string>CarPlay</string>
					<key>UISceneDelegateClassName</key>
					<string>$(PRODUCT_MODULE_NAME).CarSceneDelegate</string>
				</dict>
			</array>
			<key>UIWindowSceneSessionRoleApplication</key>
			<array>
				<dict>
					<key>UISceneClassName</key>
					<string>UIWindowScene</string>
					<key>UISceneConfigurationName</key>
					<string>Phone</string>
					<key>UISceneDelegateClassName</key>
					<string>$(PRODUCT_MODULE_NAME).PhoneSceneDelegate</string>
				</dict>
			</array>
		</dict>
	</dict>
</dict>
</plist>

This is how I added UIApplicationSceneManifest but problem here is that when we launch app on below ios14 im getting "Unable to Connect Error"

But if i add maps support entitlements i can able to render Grid or list templates. So My question is how to add support for below and above iOS14 versions for audio app in same code base.

Thanks In advance.

Answered by PavanEskala in 784344022

@Frameworks Engineer I have added both entitlements in the same app and tried to run the application but i got a crash on carPlaySceneDelate that 'Application does not implement CarPlay template application lifecycle methods in its scene delegate'. I have add all life cycle methods on carplaySceneDelagate but still i got this crash. Any idea on this crash?

CarPlay audio templates are only available for users on iOS 14 and newer. If your app supports iOS 13 and older, you can implement both audio templates as well as the deprecated playable content API in the same app. Your users on iOS 14 and later will get audio templates, and your users on iOS 13 and older will see your playable content API. See more on MPPlayableContentManager here.

Accepted Answer

@Frameworks Engineer I have added both entitlements in the same app and tried to run the application but i got a crash on carPlaySceneDelate that 'Application does not implement CarPlay template application lifecycle methods in its scene delegate'. I have add all life cycle methods on carplaySceneDelagate but still i got this crash. Any idea on this crash?

Adding CarPlay support for audio app below iOS14
 
 
Q