ios - 如何在carplay模拟器中启用触摸

标签 ios uitableview

我在 CarPlay 模拟器上运行我的应用程序,但它不支持任何触摸,也不显示标签栏。我添加了 com.apple.developer.playable-content 权利。是否需要添加任何其他权利才能在 CarPlay 模拟器上使用触摸功能。仅供引用,默认消息应用程序使用触摸功能。

最佳答案

经过几天的努力。我终于开始工作了。

1) 在您的项目中设置权利

<key>com.apple.developer.carplay-protocols</key> <array> <string>com.brand.carplay.feature</string> </array>

2) 在终端中激活 CarPlay 窗口

defaults write com.apple.iphonesimulator CarPlay -bool YES

3) 激活额外选项

defaults write com.apple.iphonesimulator CarPlayExtraOptions -bool YES

4) 将您的 CarPlay 协议(protocol)添加到 iPhone 模拟器

defaults write com.apple.iphonesimulator CarPlayProtocols -array-add com.brand.carplay.feature

您应该清理项目并从 iOS 模拟器中删除应用程序。之后 - 触摸屏和 UITabBarController 在我的应用程序中工作。

关于ios - 如何在carplay模拟器中启用触摸,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53914249/

相关文章:

ios - FaSTLane 在运行 UI 测试时扫描 "Failed to synthesize event",在 Xcode 中运行

ios - 估计数据和服务器数据不匹配 Parse.com

ios - UITableViewCell 仅在滚动时正确布局

ios - 无法在 UITableViewCell 中以编程方式创建的 UIButton 上设置图像

ios - 引用同一 View 的多个 UITableViewCell 单元 accessoryView 失败

ios - 使用平滑滚动提前加载

uitableview - [UITableViewCell _didChangeToFirstResponder :]: message sent to deallocated instance

ios - Xcode - 在另一个静态库中添加静态库

javascript - 在 Iphone、Ipad 和使用 Safari 浏览器中 - 警报 "Open with myapp"

ios - 如何以编程方式激活 ios 通知设置?