I am developing a React Native app that uses UDP broadcast and device discovery over the local Wi-Fi network (similar to 4Stream). In Debug mode everything works, but after uploading to TestFlight the local network communication stops working.
I have already added the following to 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/> <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> <key>NSAllowsLocalNetworking</key> <true/> <key>NSExceptionDomains</key> <dict> <key>localhost</key> <dict> <key>NSExceptionAllowsInsecureHTTPLoads</key> <true/> <key>NSIncludesSubdomains</key> <true/> </dict> </dict> </dict> <key>NSBluetoothAlwaysUsageDescription</key> <string>This app uses Bluetooth to discover and connect to nearby sound system devices.</string> <key>NSBluetoothPeripheralUsageDescription</key> <string>This app uses Bluetooth to connect with your sound system device.</string> <key>NSBonjourServices</key> <array> <string>_http._tcp</string> <string>_wrtn._tcp</string> <string>_services._dns-sd._udp</string> <string>_ssdp._udp</string> <string>_udp._udp</string> </array> <key>NSCameraUsageDescription</key> <string>This app needs camera access to capture attendance and user profile photos.</string> <key>NSLocalNetworkUsageDescription</key> <string>This app needs local network access to communicate with your sound system device over Wi-Fi.</string> <!-- CRITICAL: Add this key - required for mDNS/SSDP to work in TestFlight --> <key>NSBonjourServicesUsageDescription</key> <string>This app needs to discover sound system devices on your local network.</string> <key>NSLocationAlwaysAndWhenInUseUsageDescription</key> <string>Wanwun uses your location in the background to show nearby events, venues, and offers.</string> <key>NSLocationWhenInUseUsageDescription</key> <string>Wanwun uses your location while using the app to show nearby venues and improve your experience.</string> <key>NSPhotoLibraryAddUsageDescription</key> <string>This app saves captured photos to your photo library.</string> <key>NSPhotoLibraryUsageDescription</key> <string>This app needs photo library access to choose or upload existing images.</string> <key>RCTNewArchEnabled</key> <true/> <key>UILaunchStoryboardName</key> <string>LaunchScreen</string> <key>UIRequiredDeviceCapabilities</key> <array> <string>arm64</string> </array> <key>UISupportedInterfaceOrientations</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> <key>UIViewControllerBasedStatusBarAppearance</key> <false/> <key>com.apple.developer.networking.HotspotConfiguration</key> <true/> <key>com.apple.developer.networking.wifi-info</key> <true/> <!-- IMPORTANT: Also ensure this entitlement is in your .entitlements file --> <key>com.apple.developer.networking.local-outbound-connection</key> <true/> </dict> </plist>
I’ve responded on your other thread.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"