flutter ios chromecast不需要nslocalnetworkusagedesscription请求

发布于 2025-02-11 18:53:35 字数 1435 浏览 2 评论 0原文

我对flutter应用程序有问题,每当我致电 gckcastcontext.sharedinstance()。没有弹出窗口可以请求 nslocalnetworkusagedescription 用户的许可,从未出现。

我正在使用'Google-cast-sdk','〜> 4.7.0'

我已经添加了 com.apple.developer.networking.wifi-info

我还将必要字段添加到info.plist

<key>NSBonjourServices</key>
<array>
    <string>_googlecast._tcp</string>
    <string>_CC1AD845._googlecast._tcp</string>
</array>
<key>NSLocalNetworkUsageDescription</key>
<string>App uses the local network to discover Cast-enabled devices on your WiFi network.</string>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>App uses Bluetooth to discover nearby Cast devices.</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>App uses Bluetooth to discover nearby Cast devices.</string>
<key>NSMicrophoneUsageDescription</key>
<string>App uses microphone access to listen for ultrasonic tokens when pairing with nearby Cast devices.</string>

我正在使用cc1ad845用于NSBONJOURSERVICES,因为那是默认的媒体接收器应用程序ID。

这有点奇怪,因为 nsbluetoothalwaysusaveSagideScription 弹出窗口显示,并且 nslocalnetworkusagedescription 在设置和应用程序中根本没有显示出来。

有人有什么技巧,我接下来应该做什么,以便出现 nslocalnetworkusagedescription 请求对话框?

I have a problem with a flutter app, whenever I call GCKCastContext.sharedInstance().presentCastDialog() the cast device popup shows, it says to check settings to make sure that Local Network Access is on, but there is no popup to request NSLocalNetworkUsageDescription permission from the user and never appears.

I am using 'google-cast-sdk', '~> 4.7.0'

I've already added com.apple.developer.networking.wifi-info to the Entitlements.

Also added the necesary fields into Info.plist

<key>NSBonjourServices</key>
<array>
    <string>_googlecast._tcp</string>
    <string>_CC1AD845._googlecast._tcp</string>
</array>
<key>NSLocalNetworkUsageDescription</key>
<string>App uses the local network to discover Cast-enabled devices on your WiFi network.</string>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>App uses Bluetooth to discover nearby Cast devices.</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>App uses Bluetooth to discover nearby Cast devices.</string>
<key>NSMicrophoneUsageDescription</key>
<string>App uses microphone access to listen for ultrasonic tokens when pairing with nearby Cast devices.</string>

I am using CC1AD845 for NSBonjourServices because that's the Default Media Receiver Application ID.

It is a bit strange because the NSBluetoothAlwaysUsageDescription popup shows and that NSLocalNetworkUsageDescription doesn't show in settings and at all in the app.

Does anyone have any tips what I should do next in order for the NSLocalNetworkUsageDescription request dialog to appear?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文