Reputation: 574
We are developing a hybrid application using Ionic Framework.
We are using cordova geolocation plugin to get current location of user when user visits a particular screen of our application. Note - We do not want to track user location in background
Following is the code we have implemented to get the current location of user :
var options = { enableHighAccuracy: true, timeout : 10000 };
navigator.geolocation.getCurrentPosition( onSuccess, onFailure, options );
Still when user visits that screen, our app prompts user
allow 'DemoApp' to access your location even when you are not using the app
Is there any way we can tell IOS, We do not want to access location in background? We have a fear that because of this apple would reject our application.
For UIBackgroundModes Our DemoApp-Info.plist file only contains :
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>
Any help would be highly appreciated.
Upvotes: 2
Views: 1344
Reputation: 574
I am not sure if this is an ideal solution, but for time being I resolved the issue by deleting the following key-value pair from DemoApp-Info.plist file :
<key>NSLocationAlwaysUsageDescription</key>
<string></string>
Upvotes: 1