Reputation: 3347
In React Native we have this function to access the Device's Location:
navigator.geolocation.getCurrentPosition(
(position) => {
this.setState({
latitude: position.coords.latitude,
longitude: position.coords.longitude,
error: null,
});
},
(error) => this.setState({ error: error.message }),
{ enableHighAccuracy: true, timeout: 20000, maximumAge: 1000 },
);
As we see in this sample code, it receives a onSuccess and onFail functions, and also an object as third parameter where you can customize enableHighAccuracy, timeout and maximumAge.
Then when you call this, the first time it shows a Modal, requesting the user's permission to access his location. So my question is:
How can I customize the text displayed in that Modal alert?
Now Apple introduced some guiadance that requires to mention what the permission is being requested for, but I dont see a way to customize tha text message programatically.
I am stuck, and my app is being rejected many times because of this. Please advise.
Upvotes: 1
Views: 2161
Reputation: 547
Xcode
info
tabPrivacy - Location When In Use Usage Description
key (Example Privacy - Camera Usage Description) More info check this answer
Upvotes: 3