CLLocationManagerDelegate didFailError 总是回调错误是CLError 吗?

Is CLLocationManagerDelegate didFailError always callback error is CLError?

在swift中,CLLocationManagerDelegatedidFailWithError的方法总是报错?如果是,有什么参考资料吗?

Discussion: Invoked when an error has occurred. Error types are defined in "CLError.h".

这是否意味着我可以随时将错误转换为 LAError

func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) {
        guard let error = error as? CLError else {
            // Never?
            return
        }
    }

并且LAError...

当 CLLocationManager 对象无法检索位置时,我在下面找到了错误的合法参考。讨论部分在参考中也有一些示例,说明在不同情况下会收到哪些错误:

https://developer.apple.com/documentation/corelocation/cllocationmanagerdelegate/1423786-locationmanager

希望对您有所帮助!!