Check if location services are enabled

前端 未结 9 1685
情话喂你
情话喂你 2020-12-02 08:34

I\'ve been doing some research about CoreLocation. Recently, I encountered a problem that has been covered elsewhere, but in Objective C, and for iOS 8.

I feel kinda

9条回答
  •  执笔经年
    2020-12-02 09:29

    SWIFT (As of July 24, 2018)

    if CLLocationManager.locationServicesEnabled() {
    
    }
    

    this will tell you if the user has already selected a setting for the app's location permission request

提交回复
热议问题