Hi team,
I’m having an issue with my iOS app related to local network communication and connecting to a Wi-Fi speaker.
My app works similar to the “4Stream” application. The speaker and the mobile device must be on the same Wi-Fi network so the app can discover and connect to the speaker.
What’s happening:
When I run the app directly from Xcode in debug mode, everything works perfectly.
The speaker gets discovered.
The speaker gets connected successfully.
The connection flow completes without any problem.
But when I upload the same build to TestFlight, the behaviour changes completely.
The app gets stuck on the “Connecting…” screen.
The speaker is not discovered.
But the same code is working fine on Android
It never moves forward from that state.
So basically:
Debug Mode: Speaker is detected and connected properly
TestFlight: Stuck at “Connecting…”, speaker does NOT get connected
This makes me believe something related to local network access, multicast, Wi-Fi info permissions, or Bonjour discovery is not being applied correctly in the release/TestFlight environment.
Below is my current Info.plist and Entitlements file, which already include Local Network Usage, Bonjour services, Location usage for SSID, multicast entitlements, wifi-info, etc.
My Info.plist
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>Wanwun</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<!-- Allow HTTP to devices on LAN -->
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>local</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSIncludesSubdomains</key>
<true/>
</dict>
<key>localhost</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSIncludesSubdomains</key>
<true/>
</dict>
</dict>
</dict>
<!-- Local Network Usage -->
<key>NSLocalNetworkUsageDescription</key>
<string>This app needs local network access to discover and control your sound system device over Wi-Fi.</string>
<!-- Bonjour services for discovery -->
<key>NSBonjourServices</key>
<array>
<string>_http._tcp.</string>
<string>_wrtn._tcp.</string>
<string>_services._dns-sd._udp.</string>
</array>
<!-- Location for SSID Permission -->
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app requires location access to read the connected Wi-Fi information.</string>
<!-- Camera / Photos -->
<key>NSCameraUsageDescription</key>
<string>This app needs camera access to capture attendance photos.</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>This app saves captured photos to your gallery.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This app needs access to your gallery to upload existing images.</string>
<!-- Bluetooth -->
<key>NSBluetoothAlwaysUsageDescription</key>
<string>This app uses Bluetooth to discover nearby sound system devices.</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>This app uses Bluetooth to connect with your sound system.</string>
<!-- Launch screen -->
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<!-- Device Capabilities -->
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<!-- Orientation -->
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict> </plist>
My Entitlements
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.developer.location.push</key> <true/> <key>com.apple.developer.networking.HotspotConfiguration</key> <true/> <key>com.apple.developer.networking.multicast</key> <true/> <key>com.apple.developer.networking.networkextension</key> <array/> <key>com.apple.developer.networking.wifi-info</key> <true/> </dict> </plist>
What I need help with:
I want to understand why the app behaves correctly in debug mode (where the speaker connects without issues), but the same functionality fails in TestFlight.
Is there something additional required for:
Local network discovery on TestFlight?
Multicast networking?
Reading the Wi-Fi SSID?
Bonjour, service scanning?
Release build / TestFlight network permissions?
If any extra entitlement approval, configuration, or specific service type is needed for TestFlight builds, please guide me.
Thank you for your help.