Search code examples
iosxamarin.formswifiinfo.plistnehotspotconfigurationmanager

iOS App: How to set the purpose string for Wi-Fi connection dialogue to meet Apples privacy requirements


My App does connect with a device which spans an own Wifi network. Before connection to this Wifi iOS does display the typical confirmation dialogue:

"App name" wants to join Wi-Fi network "Network name"

My app is now rejected during App Store submission with following reason:

"We noticed that your app requests the user’s consent to access the local network information, but doesn’t sufficiently explain the use of the local network information in the purpose string. To help users make informed decisions about how their data is used, permission request alerts need to explain and include an example of how your app will use the requested information. Next Steps Please revise the purpose string in your app’s Info.plist file for the local network information to explain why your app needs access and include an example of how the user's data will be used."

I have already added NSLocalNetworkUsageDescription to Info.plist, but this is not displayed in this dialogue. For connection to Wi-Fi I do use NEHotspotConfigurationManager.

Has anybody an idea how to meet the requested requirement?

Thank you very much!

<?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>UIDeviceFamily</key>
    <array>
        <integer>1</integer>
        <integer>2</integer>
    </array>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
    </array>
    <key>UISupportedInterfaceOrientations~ipad</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>MinimumOSVersion</key>
    <string>10.0</string>
    <key>CFBundleDisplayName</key>
    <string>BRUNNER EAS3</string>
    <key>CFBundleIdentifier</key>
    <string>de.brunner.apps.eas3</string>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>CFBundleName</key>
    <string>Brunner.Apps.EAS3</string>
    <key>XSAppIconAssets</key>
    <string>Assets.xcassets/AppIcon.appiconset</string>
    <key>NSAllowsLocalNetworking</key>
    <true/>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
    <key>NSExceptionDomains</key>
    <dict>
        <key>192.168.4.1</key>
        <dict>
            <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
            <true/>
        </dict>
    </dict>
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSExceptionDomains</key>
        <dict>
            <key>192.168.4.1</key>
            <dict>
                <key>NSExceptionAllowsInsecureHTTPLoads</key>
                <true/>
                <key>NSIncludesSubdomains</key>
                <true/>
            </dict>
        </dict>
    </dict>
    <key>UILaunchImageFile</key>
    <string>LaunchScreen</string>
    <key>UIMainStoryboardFile</key>
    <string>LaunchScreen</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>The enables the app to find your EAS3 control automatically in WLAN.</string>
    <key>NSLocalNetworkUsageDescription</key>
    <string>The enables the app to find your EAS3 control in WLAN and maintain a communication with it so that you can monitor and control the device (only when the app is used).</string>
    <key>CFBundleVersion</key>
    <string>1.19</string>
    <key>CFBundleShortVersionString</key>
    <string>20</string>
</dict>
</plist>

Solution

  • Finally I got the following info from an Apple developer engineer:

    • There are two different alerts in play here: Local network privacy. The system presents this when an app uses any API that accesses the
      local network. For more details, see the Local Network Privacy FAQ.

    • Wi-Fi configuration. The system presents this when you save a Wi-Fi configuration using NEHotspotConfigurationManager.
      NSLocalNetworkUsageDescription applies only to local network privacy. For more on this, see FAQ-11.

    There is no way to customise the Wi-Fi configuration alert. It sounds like App Review has mistaken this for the local network privacy alert, and hence this rejection.

    With this info I got the app release.. Thanks to everybody who has answered!