ios - 使用 ConneckSDK 获取 LG TV 应用列表时出现 401 Unauthorized

标签 ios swift webos live-connect-sdk

使用 ConnectSDK .我可以成功连接到设备并运行 device.launcher().launchNetflix() 实际启动 Netflix。但是,大多数应用程序都是使用 device.launcher().launchApp(appID: String) 启动的,但我无法从哪里找到每个应用程序的 appID。我最初的想法是使用 device.launcher().getAppList() 获取应用程序列表并将它们加载到 TableView 中,但这会引发 401 用户未授权错误。

最佳答案

看起来 certain features 需要额外的配对步骤仅仅连接是不够的。可以找到配对说明 here .只需向下滚动到显示“配对级别”的位置。基本上你的代码应该是这样的:

discoveryManager = DiscoveryManager.shared()
discoveryManager?.pairingLevel = DeviceServicePairingLevelOn
discoveryManager?.startDiscovery()

这将要求用户将电视上的代码输入到您的应用中。配对后,对于大多数这些功能,401 错误应该会消失。

关于ios - 使用 ConneckSDK 获取 LG TV 应用列表时出现 401 Unauthorized,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53076674/

相关文章:

iphone - 如何以相同的顺序将字符串的 NSArray 转换为唯一字符串数组?

swift:邮件撰写 View Controller 不会关闭

javascript - Palm Pre 框架

ios - 编码/解码 base64 解码数据 = nil

ios - 如何在 iOS 中使用自定义转换解决此问题?

javascript - LG WebOS 3.5 是否支持用于 QA 的 webdriver?

javascript - 是否可以在 webOS TV 应用程序中获取用户的地理位置?

ios - 来自 NSDate 的 NSDateComponents 产生了意想不到的结果

iOS 11 更喜欢 LargeTitles 在滚动之前不更新

ios - 使用单例获取 "unrecognized selector sent to class"