我有一个应用程序,有汽车播放功能,它支持ios12+。最近苹果发布了iOS15,而旧的CarPlay已经不能工作了。(看起来很少有apis从“弃用”状态变为“不工作”状态。)
iOS15 CarPlay需要使用来自‘iOS13’的应用程序场景清单-info.plist选项进行应用程序样式项目设置,而iOS12不能使用‘’应用程序场景清单‘’
这两个冲突的情况让我很沮丧。
我想知道是否有人能解决这个问题..。
谢谢
发布于 2021-10-05 16:48:07
无论您是否放弃iOS 12,您都必须迁移现有的实现以支持“新的”CarPlay。似乎iOS 15设备不能处理旧的MPPlayableContent实现,即使它们应该是向后兼容的(我看到的是根列表,但我不能点击任何行)。
我的应用程序同时支持MPPlayableContent和CarPlay框架中的新模板样式。关键步骤是:
CPTemplateApplicationSceneDelegateSceneDelegate)UIApplicationSceneManifest info.plist )的CarPlay(即CarPlaySceneDelegate)的场景委托,并为UISceneConfigurations添加CPTemplateApplicationSceneSessionRoleApplication和UIWindowSceneSessionRoleApplication条目(类名称必须与相应的场景委托类名称匹配)<代码>H118application(_:open:options:)和scene(_:openURLContexts:)的逻辑是围绕着新的apis和@available(iOS 13.0, *):Reimplement CarPlay using 请参阅苹果示例代码:https://developer.apple.com/documentation/carplay/integrating_carplay_with_your_music_app
有关设置过程的更多详细信息:https://medium.com/br-next/launching-br-radio-on-carplay-audio-8baab824b932
https://stackoverflow.com/questions/69447573
复制相似问题