12 Replies Latest reply on Jan 23, 2018 5:23 AM by Freeglider

    Rejected from Apple: Data Collection and Storage

    Freeglider

      My app got rejected  from Apple with the following message:

       

      "We noticed that your app requests the user’s consent to access the location but does not clarify the use of this feature in the permission modal alert. To resolve this issue, please revise the permission modal alert to specify why the app is requesting access to the location."

       

      How can I fix that?

       

      Thank you all!

        • 1. Re: Rejected from Apple: Data Collection and Storage
          jcesarmobile_ Adobe Community Professional

          First of all, make sure you are using cordova-plugin-geolocation 3.0.0 or newer

           

           

          Then add this to your config.xml to set the usage description text (change "some reason" with your actual reason)

           

          <edit-config target="NSLocationWhenInUseUsageDescription" file="*-Info.plist" mode="merge">
            <string>some reason</string>
          </edit-config>

          • 2. Re: Rejected from Apple: Data Collection and Storage
            Freeglider Level 1

            Thanks a lot, I have updated cordova-plugin-geolocation to the latest version 4.0.1 and added the <edit-config> snippet to the config.xml.

            Sadly, my reason still doesn't show up and the app got rejected again.attachment-2585232145317883744Screenshot-0116-160538.png

            • 3. Re: Rejected from Apple: Data Collection and Storage
              jcesarmobile_ Adobe Community Professional

              Can you list all the plugins you are using with versions?
              Maybe other is overwriting that text, probably the camera one.

              • 4. Re: Rejected from Apple: Data Collection and Storage
                Freeglider Level 1

                This is the complete config.xml inclusive all plugins and its versions:

                 

                 

                <?xml version='1.0' encoding='utf-8'?>

                <widget id="xxxxxxxxxxxxx" version="1.0.17" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">

                    <name>xxxxxxxxxxxxx</name>

                    <description>

                        xxxxxxxxxxxxx

                    </description>

                    <author email="xxxxxxxxxxxxx" href="xxxxxxxxxxxxx">

                        xxxxxxxxxxxxx

                    </author>

                    <content src="index.html" />

                    <icon density="mdpi" height="40" platform="ios" src="res/ios/icon_40x40.png" width="40" />

                    <icon density="mdpi" height="50" platform="ios" src="res/ios/icon_50x50.png" width="50" />

                    <icon density="mdpi" height="50" platform="ios" src="res/ios/Icon-Small-50@2x.png" width="50" />

                    <icon density="mdpi" height="72" platform="ios" src="res/ios/icon_72x72.png" width="72" />

                    <icon density="mdpi" height="72" platform="ios" src="res/ios/Icon-72@2x.png" width="72" />

                    <icon density="mdpi" height="76" platform="ios" src="res/ios/icon_76x76.png" width="76" />

                    <icon density="mdpi" height="120" platform="ios" src="res/ios/icon_120x120.png" width="120" />

                    <icon density="mdpi" height="152" platform="ios" src="res/ios/icon_152x152.png" width="152" />

                    <icon density="mdpi" height="1024" platform="ios" src="res/ios/icon_1024x1024.png" width="1024" />

                    <preference name="DisallowOverscroll" value="true" />

                    <preference name="android-minSdkVersion" value="14" />

                    <plugin name="cordova-plugin-battery-status" source="npm" spec="~1.1.1" />

                    <plugin name="cordova-plugin-media-capture" source="npm" spec="~1.2.0" />

                    <plugin name="cordova-plugin-console" source="npm" spec="~1.0.2" />

                    <plugin name="cordova-plugin-contacts" source="npm" spec="~2.0.1" />

                    <plugin name="cordova-plugin-device" source="npm" spec="~1.1.1" />

                    <plugin name="cordova-plugin-device-motion" source="npm" spec="~1.2.0" />

                    <plugin name="cordova-plugin-device-orientation" source="npm" spec="~1.0.2" />

                    <plugin name="cordova-plugin-dialogs" source="npm" spec="~1.2.0" />

                    <plugin name="cordova-plugin-file" source="npm" spec="~4.1.1" />

                    <plugin name="cordova-plugin-file-transfer" source="npm" spec="~1.5.0" />

                    <plugin name="cordova-plugin-globalization" source="npm" spec="~1.0.3" />

                    <plugin name="cordova-plugin-media" source="npm" spec="~2.2.0" />

                    <plugin name="cordova-plugin-network-information" source="npm" spec="~1.2.0" />

                    <plugin name="cordova-plugin-splashscreen" source="npm" spec="~3.2.1" />

                    <plugin name="cordova-plugin-statusbar" source="npm" spec="~2.1.2" />

                    <plugin name="cordova-plugin-vibration" source="npm" spec="~2.1.0" />

                    <plugin name="cordova-plugin-whitelist" source="npm" spec="~1.2.1" />

                    <icon src="icon.png" />

                    <access origin="xxxxxxxxxxxxx/*" />

                    <allow-intent href="xxxxxxxxxxxxx/*" />

                    <allow-intent href="tel:*" />

                    <allow-intent href="sms:*" />

                    <allow-intent href="mailto:*" />

                    <allow-intent href="geo:*" />

                    <platform name="android">

                        <allow-intent href="market:*" />

                    </platform>

                    <platform name="ios">

                        <allow-intent href="itms:*" />

                        <allow-intent href="itms-apps:*" />

                    </platform>

                    <feature name="Notification">

                        <param name="android-package" value="org.apache.cordova.dialogs.Notification" />

                    </feature>

                    <feature name="Vibration">

                        <param name="android-package" value="org.apache.cordova.vibration.Vibration" />

                    </feature>

                    <feature name="Notification">

                        <param name="ios-package" value="CDVNotification" />

                    </feature>

                    <plugin name="cordova-plugin-camera" spec="~2.4.1">

                        <variable name="CAMERA_USAGE_DESCRIPTION" value="Take pictures and add them to your profile" />

                        <variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="Upload pictures and add them to your profile" />

                    </plugin>

                    <plugin name="cordova-plugin-inappbrowser" spec="~1.3.0" />

                <edit-config target="NSLocationWhenInUseUsageDescription" file="*-Info.plist" mode="merge">

                <string>We use your geolocation to find interesting people near you</string>

                </edit-config>

                    <plugin name="cordova-plugin-geolocation" spec="~4.0.1" />

                </widget>

                • 5. Re: Rejected from Apple: Data Collection and Storage
                  jcesarmobile_ Adobe Community Professional

                  Yeah, it's the camera plugin overwriting the edit-config entry value.

                   

                  You will have to update it to 3.0.0 or newer (latest is 4.0.1)

                   

                  And you will also need to add usage descriptions for camera access, photo library read and photo library write (this only if you use the option to save to photo library)

                   

                  <edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="merge">
                    <string>need camera access to take pictures</string>
                  </edit-config>

                  <edit-config target="NSPhotoLibraryUsageDescription" file="*-Info.plist" mode="merge">
                    <string>need to access photo library to get pictures from there</string>
                  </edit-config>

                   

                  <edit-config target="NSPhotoLibraryAddUsageDescription" file="*-Info.plist" mode="merge">
                    <string>need to access photo library to save pictures there</string>
                  </edit-config>

                  • 6. Re: Rejected from Apple: Data Collection and Storage
                    Freeglider Level 1

                    I have updated the camera plugin to the latest version (and many other plugins as well). Also I have added the following lines to the config.xml:

                     

                    <plugin name="cordova-plugin-geolocation" spec="~4.0.1" />
                    <plugin name="cordova-plugin-camera" spec="~4.0.1" />
                    
                    <edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
                        <string>We use your geolocation to find interesting people near you</string>
                    </edit-config>
                    <edit-config file="*-Info.plist" mode="merge" target="NSCameraUsageDescription">
                        <string>Take a picture and add it to your profile</string>
                    </edit-config>
                    <edit-config file="*-Info.plist" mode="merge" target="NSPhotoLibraryUsageDescription">
                        <string>Select a picture and add it to your profile</string>
                    </edit-config>
                    

                     

                     

                    Nevertheless, Apple rejected my app again with the following email:

                     

                    Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.

                     

                    Any idea what's the problem? It seems like a false positive since the key NSPhotoLibraryUsageDescription does exist. I really appreciate your great help.NSPhotoLibraryUsageDescription

                    • 7. Re: Rejected from Apple: Data Collection and Storage
                      jcesarmobile_ Adobe Community Professional

                      Another plugin that writes the NSPhotoLibraryUsageDescription is cordova-plugin-media-capture, you will need 2.0.0 or newer (latest is 3.0.1)

                      • 8. Re: Rejected from Apple: Data Collection and Storage
                        Freeglider Level 1

                        I have update all plugins to the latest version. Sadly, Apple still replies with the same email:

                         

                        Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.

                         

                        This is how my config.xml looks meanwhile:

                        <?xml version='1.0' encoding='utf-8'?>
                        <widget id="xxxxxxxxxxxxxxxxxx" version="1.0.23" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
                            <name>xxxxxxxxxxxxxxxxxx</name>
                            <description>
                                xxxxxxxxxxxxxxxxxx
                            </description>
                            <author email="xxxxxxxxxxxxxxxxxx" href="xxxxxxxxxxxxxxxxxx">
                                xxxxxxxxxxxxxxxxxx
                            </author>
                            <content src="index.html" />
                            <icon density="mdpi" height="40" platform="ios" src="res/ios/icon_40x40.png" width="40" />
                            <icon density="mdpi" height="50" platform="ios" src="res/ios/icon_50x50.png" width="50" />
                            <icon density="mdpi" height="50" platform="ios" src="res/ios/Icon-Small-50@2x.png" width="50" />
                            <icon density="mdpi" height="72" platform="ios" src="res/ios/icon_72x72.png" width="72" />
                            <icon density="mdpi" height="72" platform="ios" src="res/ios/Icon-72@2x.png" width="72" />
                            <icon density="mdpi" height="76" platform="ios" src="res/ios/icon_76x76.png" width="76" />
                            <icon density="mdpi" height="120" platform="ios" src="res/ios/icon_120x120.png" width="120" />
                            <icon density="mdpi" height="152" platform="ios" src="res/ios/icon_152x152.png" width="152" />
                            <icon density="mdpi" height="1024" platform="ios" src="res/ios/icon_1024x1024.png" width="1024" />
                            <preference name="DisallowOverscroll" value="true" />
                            <preference name="android-minSdkVersion" value="14" />
                            <icon src="icon.png" />
                            <access origin="xxxxxxxxxxxxxxxxxx/*" />
                            <allow-intent href="xxxxxxxxxxxxxxxxxx/*" />
                            <allow-intent href="tel:*" />
                            <allow-intent href="sms:*" />
                            <allow-intent href="mailto:*" />
                            <allow-intent href="geo:*" />
                            <platform name="android">
                                <allow-intent href="market:*" />
                            </platform>
                            <platform name="ios">
                                <allow-intent href="itms:*" />
                                <allow-intent href="itms-apps:*" />
                            </platform>
                            <feature name="Notification">
                                <param name="android-package" value="org.apache.cordova.dialogs.Notification" />
                            </feature>
                            <feature name="Vibration">
                                <param name="android-package" value="org.apache.cordova.vibration.Vibration" />
                            </feature>
                            <feature name="Notification">
                                <param name="ios-package" value="CDVNotification" />
                            </feature>
                        <plugin name="cordova-plugin-inappbrowser" spec="~1.3.0" />
                        <plugin name="cordova-plugin-media-capture" spec="~3.0.1" />
                        <plugin name="cordova-plugin-file" spec="~6.0.1" />
                        <plugin name="cordova-plugin-media" spec="~5.0.1" />
                        <plugin name="cordova-plugin-geolocation" spec="~4.0.1" />
                        <plugin name="cordova-plugin-camera" spec="~4.0.1" />
                        <plugin name="cordova-plugin-device-orientation" spec="~1.0.7" />
                        <plugin name="cordova-plugin-console" spec="~1.1.0" />
                        <plugin name="cordova-plugin-dialogs" spec="~2.0.1" />
                        <plugin name="cordova-plugin-network-information" spec="~1.2.1" />
                        <plugin name="cordova-plugin-globalization" spec="~1.0.9" />
                        <plugin name="cordova-plugin-statusbar" spec="~2.4.1" />
                        <plugin name="cordova-plugin-vibration" spec="~3.0.1" />
                        <plugin name="cordova-plugin-whitelist" spec="~1.3.3" />
                            <edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription">
                                <string>We use your geolocation to find interesting people near you</string>
                            </edit-config>
                            <edit-config file="*-Info.plist" mode="merge" target="NSCameraUsageDescription">
                                <string>Take a picture and add it to your profile</string>
                            </edit-config>
                            <edit-config file="*-Info.plist" mode="merge" target="NSPhotoLibraryUsageDescription">
                                <string>Select a picture and add it to your profile</string>
                            </edit-config>
                        </widget>
                        
                        • 9. Re: Rejected from Apple: Data Collection and Storage
                          jcesarmobile_ Adobe Community Professional

                          Are you using Phonegap/Cordova CLI to build or phonegap build?
                          In case it's a CLI, which versions?

                           

                           

                          In the previous message you had file-transfer plugin but not in latest, have you removed it?

                          • 10. Re: Rejected from Apple: Data Collection and Storage
                            Freeglider Level 1

                            I'm using Phonegap Build. I cannot use Phonegap CLI since I don't have a mac.

                             

                            Yes, I have removed file-transfer since it's deprecated and it caused problems during build. And I'm not using it anyway.

                            • 11. Re: Rejected from Apple: Data Collection and Storage
                              jcesarmobile_ Adobe Community Professional

                              Ok, just asking because there is another forum about Phonegap Build

                               

                              Try setting the CLI version to use to 7.1.0 like this

                              <preference name="phonegap-version" value="cli-7.1.0" />

                              And remove cordova-plugin-console

                              1 person found this helpful
                              • 12. Re: Rejected from Apple: Data Collection and Storage
                                Freeglider Level 1

                                You are awesome, my app is finally online!

                                Thanks a lot for your really great help!