[mob] Disable auto-cast for iOS (#1633)

## Description

## Tests
Tested on sim
This commit is contained in:
Neeraj Gupta 2024-05-07 10:35:35 +05:30 committed by GitHub
commit a39e6b54cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 29 additions and 25 deletions

View file

@ -108,7 +108,7 @@
<key>NSBonjourServices</key>
<array>
<string>_googlecast._tcp</string>
<string>F5BCEC64._googlecast._tcp</string>
<string>_F5BCEC64._googlecast._tcp</string>
</array>
<key>NSLocalNetworkUsageDescription</key>

View file

@ -738,6 +738,9 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
// stop any existing cast session
gw.revokeAllTokens().ignore();
if (!Platform.isAndroid) {
await _pairWithPin(gw, '');
} else {
final result = await showDialog<ButtonAction?>(
context: context,
barrierDismissible: true,
@ -768,6 +771,7 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
await _pairWithPin(gw, '');
}
}
}
Future<void> _pairWithPin(CastGateway gw, String code) async {
await showTextInputDialog(