No known key found for this signature in database
GPG Key ID: 1D7529BE14E2BBA9
2 changed files with
15 additions and
4 deletions
-
F5 Weather.xcodeproj/xcuserdata/hrbrmstr.xcuserdatad/xcschemes/xcschememanagement.plist
-
f5-weather/model.swift
|
|
@ -4,6 +4,16 @@ |
|
|
|
<dict> |
|
|
|
<key>SchemeUserState</key> |
|
|
|
<dict> |
|
|
|
<key>F5-Weather-Cat (iOS).xcscheme_^#shared#^_</key> |
|
|
|
<dict> |
|
|
|
<key>orderHint</key> |
|
|
|
<integer>2</integer> |
|
|
|
</dict> |
|
|
|
<key>F5-Weather-Cat (macOS).xcscheme_^#shared#^_</key> |
|
|
|
<dict> |
|
|
|
<key>orderHint</key> |
|
|
|
<integer>1</integer> |
|
|
|
</dict> |
|
|
|
<key>f5-weather.xcscheme_^#shared#^_</key> |
|
|
|
<dict> |
|
|
|
<key>orderHint</key> |
|
|
|
|
|
@ -61,7 +61,7 @@ class AppModel: ObservableObject { |
|
|
|
let data = data, |
|
|
|
let res = String(data: data, encoding: .utf8) { |
|
|
|
DispatchQueue.main.async { |
|
|
|
|
|
|
|
|
|
|
|
let lines = res.split(whereSeparator: \.isNewline) // convert the String response to lines |
|
|
|
|
|
|
|
self.forecast = lines.map { line in // process JSON in each line |
|
|
@ -96,10 +96,11 @@ class AppModel: ObservableObject { |
|
|
|
task.resume() |
|
|
|
|
|
|
|
} else { |
|
|
|
self.showAlert = true |
|
|
|
self.alertMessage = "URL error" |
|
|
|
logger.info("URL Error") |
|
|
|
return |
|
|
|
DispatchQueue.main.async { |
|
|
|
self.showAlert = true |
|
|
|
self.alertMessage = "URL error" |
|
|
|
} |
|
|
|
} // URL |
|
|
|
} // urlString |
|
|
|
} // getForecast() |
|
|
|