[Location Plugin] [GoogleMapsPlugin] Plugin Rejected by Apple.

Hi,
I have two plugins in mobile app. 

Location plugin and GoogleMapsPlugin 

both uses device location. When I push application to app store then apple rejected the app due to that I haven't describe the purpose of usage of device location.
I followed this post completely but no success.
https://www.outsystems.com/forums/discussion/33058/plugin-rejected-by-apple/



in both plugins I couldn't find the variable "NSLocationWhenInUseUsageDescription" so I cloned these plugins and  I added  following lines in plugin.xml


<preference name="GEOLOCATION_USAGE_DESCRIPTION"/>  
      <config-file target="*-Info.plist" parent="NSLocationWhenInUseUsageDescription" >
    <string>$GEOLOCATION_USAGE_DESCRIPTION</string>
</config-file>


and following in extensibility configurations

{
                "name": "GEOLOCATION_USAGE_DESCRIPTION",
                "value": "Your current location will be used and displayed on the map to tag the community."
}

but I'm not getting my custom message while ios ask me for permissions but it's showing default message every time.  the message is "Show your location on the map"

It should show "Your current location will be used and displayed on the map to tag the community." instead.

I have tried to regenerate ios app but no success.
can anyone suggest me in this regard ?


Thanks


Hi Ali,

I'm sorry for the delay. Are you using also the Camera Plugin? If so, you should update both plugins to the latest version (there were some issues in the past when using these two plugins).

Nonetheless, since you are using a supported component, the best way to get help on troubleshooting this issue is by reaching out to the support team

Vera

Hi again Ali, not sure if you were arleady able to solve it, but here it goes:

Solution: the Edit PList info plugin from Github (https://github.com/kelter-antunes/cordova-plugin-edit-plist-file/), I was able to do so. I’ve downloaded it from Git, added the configuration in plugin.xml:

<platform name="ios">
       
        <config-file parent="NSCameraUsageDescription" target="*-Info.plist">
            <string>We are using a camera to bla bla bla </string>
        </config-file>
       
        <config-file parent="NSPhotoLibraryUsageDescription" target="*-Info.plist">
            <string>We are using the gallery to bla bla bla </string>
        </config-file>
       
        <config-file parent="NSMicrophoneUsageDescription" target="*-Info.plist">
            <string>We are using your microphone to bla bla bla </string>
        </config-file>
       
    </platform>


Added, this plugin as a zip resource to the module, added it to Extensibility Configuration and my messages appear.

Vera Tiago wrote:

Hi again Ali, not sure if you were arleady able to solve it, but here it goes:

Solution: the Edit PList info plugin from Github (https://github.com/kelter-antunes/cordova-plugin-edit-plist-file/), I was able to do so. I’ve downloaded it from Git, added the configuration in plugin.xml:

Added, this plugin as a zip resource to the module, added it to Extensibility Configuration and my messages appear.

Hi Vera,

This is excellent.  I'm trying this to solve an issue I'm having with overriding the file upload permissions string.  However its not working and I haven't fiddled with the extensibility stuff much.  does this look correct ?


xml in plugin archive (I just modified the iOS portion and left the rest as downloaded:


<!-- ios -->
    <platform name="ios">
       
        <config-file parent="NSCameraUsageDescription" target="*-Info.plist">
            <string>We are accessing the camera so you can upload photos to our app</string>
        </config-file>
       
    </platform>


Compressed and added the plugin folder as a resource (not public) - should I be referencing this by the path or the name in the extensibility config?


the extensibility config:


{
    "preferences": {
        "global": [{
            "name": "orientation",
            "value": "portrait"
        }],
        "ios" : [{
            "name": "AllowInlineMediaPlayback",
            "value" : "true"
        }],
        "android": [{
            "name": "InAppBrowserCleartextTrafficPermitted",
            "value": "true"
        }]
    },
    "resource": "/DABIL/cordova-plugin-edit-plist-file-master.zip",
    "plugin": {
        "resource": "cordova-plugin-edit-plist-file"
    }



Steve Bramley wrote:

In response to my own hanging question


ok.  check out Filipe Carvalho's post on this thread https://www.outsystems.com/forums/discussion/22505/how-to-add-entries-to-plist-file-for-ios/ 

the OS docs say to use the ID in the included xml file in the zip resource.  don't, it doesn't work.  just use the name of the unzipped container folder.  so as above, 

  "resource": "/DABIL/cordova-plugin-edit-plist-file-master.zip",
    "plugin": {
        "resource": "cordova-plugin-edit-plist-file-master"
    }

but not the id as the resource.  use the unzipped folder name as the resource