yagiz / Bagel

a little native network debugging tool for iOS
Apache License 2.0
4.35k stars 317 forks source link

iOS14 compatible #63

Open LiMaoAtCD opened 4 years ago

colinhumber commented 3 years ago

Note that on iOS 14 NSBonjourServices and NSLocalNetworkUsageDescription details need to be included in the Info.plist. A -72008 error code will be thrown otherwise and the app will crash due to an infinite loop.

/* Missing required configuration for local network access.
 *
 * NSBonjourServices and NSLocalNetworkUsageDescription are required in Info.plist
 */
    NSNetServicesMissingRequiredConfigurationError API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0)) API_UNAVAILABLE(watchos) = -72008L,
Servus7 commented 3 years ago

In case anyone struggling with it:

NSBonjourServices

<key>NSBonjourServices</key>
<array>
    <string>_Bagel._tcp</string>
</array>

NSLocalNetworkUsageDescription

<key>NSLocalNetworkUsageDescription</key>
<string>Network access required</string>