Home > database >  iOS App: How to set the purpose string for Wi-Fi connection dialogue to meet Apples privacy requirem
iOS App: How to set the purpose string for Wi-Fi connection dialogue to meet Apples privacy requirem

Time:11-04

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>

CodePudding user response:

Show the exact XML in Info.plist file for NSLocalNetworkUsageDescription. Maybe you have some character in your explanation that is not valid XML? (so needs to be encoded as per XML spec). I'm thinking XML parse of that string value fails, so it is not used.

CodePudding user response:

Apple's reply means that you have to add NSLocalNetworkUsageDescription key and string. It also named Privacy - Local Network Usage Description in the XCode property list editor.

From the reply, it seems that you should add sufficient reason to meet their standards. I also find an issue similar to yours. Please have a look. And from my experience, app with wifi connection would be checked more strictly. Some were even asked to provide a video showing how the app connects with the device.

It would be much better if you could show us your plist file.

  • Related