swift - Carplay 应用程序未在 iOS 13 模拟器上显示

标签 swift ios13 carplay xcode11

我开发了汽车 CarPlay 应用程序。应用程序适用于 iOS 11 和 12 Carplay 模拟器。我正在尝试在 iOS 13 CarPlay 模拟器上运行应用程序,但应用程序未出现在 CarPlay 模拟器上。

我运行了以下命令:

defaults write com.apple.iphonesimulator CarPlayExtraOptions -bool YES
defaults write com.apple.iphonesimulator CarPlayProtocols -array-add com.mycarbundle.app
defaults write com.apple.iphonesimulator CarPlay -bool YES

enter image description here

1.Carplay Connect

NotificationCenter.default
    .addObserver(forName: UIScreen.didConnectNotification,
                  object: nil,
                   queue: .main) { (notification) in
     print("Carplay Connected")
}

2.Carplay DisConnect

NotificationCenter.default
    .addObserver(forName: UIScreen.didDisconnectNotification,
                  object: nil,
                   queue: .main) { (notification) in
    print("Carplay DisConnected")
}

这个方法没有被调用。 如果有人在 iOS 13 中做过,请帮助我?

谢谢

最佳答案

Xcode 11.0 和 11.2.1 版本未在模拟器中显示 carplay 应用程序。这是一个 xcode 错误。它现在可以在 Xcode 11.3 beta 上运行。

关于swift - Carplay 应用程序未在 iOS 13 模拟器上显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59031529/

相关文章:

ios - viewDidLoad 中的快速设置属性不起作用,但在 viewDidAppear 中有效

swift - Flutter channel 方法字符串不能用作 URL

ios - Swift 和 Objc 的互操作性——可用性不仅仅在 objc 中起作用

ios - iOS 13 AASA文件未下载

ios - 在 iOS 模拟器中切换 CarPlay 和常规窗口

swift - 测试 UIAlertController 是否已经出现

ios - 如何隐藏 View 上的状态栏

ios - 仅在 iOS 13.1 和 13.2 中弹出 View 后面有奇怪的阴影

ios - MPPlayableContentDataSource 不调用 contentItemForIdentifier :completionHandler:

ios - 从锁定的设备启动 CarPlay 音频应用程序时无法启动