WeatherDataService Error when I call function 'Get Weather Data' using WeatherKit

208 Views Asked by At

I have a problem with WeatherKit and receive data error with:

2022-11-15 15:26:29.810771+0900 WeatherApp[40976:2003546] [WeatherDataService] Response did not contain requested dataset: .appLocationConfig. Returning default value: AppLocationConfig(reportAnIssue: ReportIssueLocationConfig(position: beforeFooter, minDaysSinceInteraction: 0), expireTime: 2022-11-15 06:56:29 +0000

    func getWeather(CLlocation: CLLocation, completion: @escaping () -> Void){
        Task {
            do {
                let result = try await weatherService.weather(for: CLlocation)
                weatherDataArray.append(result)
            } catch {
                print(error)
            }
        }
    }


 func getWeatherWithCood(lat: CLLocationDegrees, lon: CLLocationDegrees, completion: @escaping () -> Void){
        Task {
            do {
                let result = try await weatherService.weather(for: .init(latitude: lat, longitude: lon))
                weatherDataArray.append(result)
            } catch {
                print(error)
            }
        }
    }

How can I solve this problem?

I checked my account identifier but I still have the problem.

0

There are 0 best solutions below