您不能以编程方式启用用户点击不允许的方式。您只需通知用户,他必须转到设置 - >定位服务,并为您的应用启用它,如果他想使用此功能。
您可以设置该位置的purpose,它将显示在操作系统显示的第一个警报视图中,当将要求用户许可时。
purpose
An application-provided string that describes the reason for using location services.
@property(copy, nonatomic) NSString *purpose
Discussion
If this property is not nil and the system needs to ask for the user’s consent to use location services, it displays the provided string. You can use this string to explain why your application is using location services.
You must set the value of this property prior to starting any location services. Because the string is ultimately displayed to the user, you should always load it from a localized strings file.
如果用户点击了不允许。下次如果用户再次去app.Its不显示alertview。 – Rupesh 2012-02-09 07:30:15
没有那只是当应用程序尝试访问位置服务时第一次。每次您必须检查CLAuthorizationStatus并根据它提醒用户 – 2012-02-09 07:40:52
他们是没有其他方法没有以编程方式启用服务? – Rupesh 2012-02-09 07:42:45