Nick
Nick

Reputation: 63

Is there way to customize system alerts?

I need to replace standard alert that asks permission to access user location with my own. Is it possible?

Or is there way to customize system alerts?

Thanks a lot! ;)

Upvotes: 1

Views: 79

Answers (1)

rckoenes
rckoenes

Reputation: 69459

You can only add the reason of the use of location, you are not able to change the alert yourself.

Add the following :

<key>NSLocationAlwaysUsageDescription</key>
<string>We need to determine your location, to check where you are on a route.</string>
<key>NSLocationUsageDescription</key>
<string>We need to determine your location, to check where you are on a route.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>We need to determine your location, to check where you are on a route.</string>

Before iOS 8 it uses NSLocationUsageDescription, iOS 8 it use NSLocationAlwaysUsageDescription for the always use location and NSLocationWhenInUseUsageDescription when using the location when you app is active.

Upvotes: 2

Related Questions