make a weather app ios swift code example
Example 1: weather api in ios swift 5
private let dataManager = DataManager(baseURL: API.AuthenticatedBaseURL)
Example 2: weather api in ios swift 5
private func processWeatherData(data: Data, completion: WeatherDataCompletion) {
if let JSON = try? JSONSerialization.jsonObject(with: data, options: []) as AnyObject {
completion(JSON, nil)
} else {
completion(nil, .InvalidResponse)
}
}