您不能以編程方式啓用用戶點擊不允許的方式。您只需通知用戶,他必須轉到設置 - >定位服務,併爲您的應用啓用它,如果他想使用此功能。
您可以設置該位置的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