我下载了 chromecast ios 示例,当我将示例应用程序连接到 chromecast 时,出现以下错误:
error domain=com.google.GCKError code=7 “操作无法完成。(com.google.GCKError 错误 7。)”
你知道为什么吗?
最佳答案
我在测试 Google 在 GitHub 上提供的“CastHelloText-ios”示例时收到了相同的错误消息。
首先我检查了谷歌描述的所有必需步骤都没有问题:
- 在您的 Cast 开发者控制台中:检查您的 Chromecast 是否处于“准备测试”状态,否则 register it .
- 在网络上的某个地方托管接收器并记下 URL
- 在 Cast 开发者控制台中,声明一个带有自定义接收器的新应用并填写接收器的 URL。保存并记下应用程序 ID。
- 在您的 iOS 应用程序的 Controller 中填写此应用程序 ID:static NSString *const kReceiverAppID = @"1234ABCD";
- 确保您的 chromecast 勾选了“在检查更新时将此 Chromecast 的序列号发送给 Google”选项(在 iOS 应用程序中,它位于您设备的“常规”部分)
最后我通过重启 chromecast 解决了这个问题:
- 运行来自 Google 的 Chromecast iOS 应用程序,点击您的 Chromecast 设备,点击常规,然后点击红色按钮“重启”。
有关信息,我在阅读此 Google documentation 的说明后执行了此重启:
If you wish to verify that your published application is working properly, you can manually restart your Google Cast device to force a load of new configuration data.
附言: - 要重启您的 chromecast,您可以使用 Google 提供的任何 chromecast 应用程序(iOS、Android、MAC 等)
关于ios - google-cast 示例 ios/应用程序的错误 7 是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21913602/