Request iOS local-network permission at app launch

The iOS local-network permission prompt fires on the first local-network
access. That used to be the user's "Test" tap in settings, so the prompt
appeared mid-request and the first connection attempt always failed.

Provoke the prompt at launch instead via an mDNS multicast datagram, so the
permission is settled before the user reaches settings. Platform exclusion is
handled with a conditional import: web gets a no-op stub (keeping dart:io out
of web builds) and the native path no-ops off iOS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
rzuasti
2026-06-07 15:33:06 -04:00
co-authored by Claude Opus 4.8
parent 87af782985
commit 40a7f3a432
6 changed files with 63 additions and 0 deletions
+2
View File
@@ -45,6 +45,8 @@
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>NSLocalNetworkUsageDescription</key>
<string>OOTT connects to your OOTT backend on your local network to monitor devices and deliver alerts.</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsLocalNetworking</key>