How to change the text "Does the application want to use your current location?"

Can we change this text?

I used the purpose property of the CLLocationManager class. But the message has not changed.

 [locationManager setPurpose:@"Change text message"]; 

Any ideas?

Thanks,

+6
source share
1 answer

Add a key to your info.plist, for example: NSLocationUsageDescription and add your line as a value.

iOS 8 and above

They entered two more keys besides NSLocationUsageDescription

iOS 6 or higher

NSLocationUsageDescription

"Privacy - Description of the use of location"

Indicates the reason for accessing the location information of users. See "NSLocationUsageDescription" for details.

iOS 6.0 and later

Mark the link for reference

iOS 3.2 to iOS 5

goal

A line with an application that describes the reason for using location services. (Deprecated in iOS 6.0.)

@property(copy, nonatomic) NSString *purpose Discussion

If this property is not equal to zero, and the system should ask users for consent to use location services, it displays the provided string. You can use this line to explain why your application uses the location of the service.

You must set the value of this property before starting any Services location. Since the string is ultimately displayed to the user, you should always load it from the localized string file.

Availability

 Available in iOS 3.2 and later. Deprecated in iOS 6.0. 

Announced in CLLocationManager.h

+12
source

All Articles