'value' is inaccessible due to 'internal' protection level

后端 未结 3 2014
傲寒
傲寒 2021-01-28 14:07

Setting up API for openweathermap. However, when it comes to setting up this:

func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [C         


        
3条回答
  •  抹茶落季
    2021-01-28 14:58

    In the latest beta 4 version Alamofire switched to using the new standard Result type, so the convenience properties we used to have have been made internal. Now you can switch over the result like this:

    switch response.result {
        case let .success(value): ...
        case let .failure(error): ...
    }
    

    Or you can make similar extensions in your own project. They won't be offering the extensions publicly anymore.

提交回复
热议问题