Post

Replies

Boosts

Views

Activity

Weather forecast one day short
Using WeatherKit I want to get a 5-day forecast starting tomorrow, however, I only get 4 elements in the forecast. What am I missing here? public func updateWeather()async{ guard locationManager.location != nil else {locationManager.updateLocation(); return} if self.needsUpdating{ let startOfToday = Calendar.current.startOfDay(for: Date()) let endOfToday = startOfToday+24*3600 let firstDay:Date = endOfToday+1 let lastDay:Date = firstDay+(5*24*3600) futureWeather = try? await WeatherService.shared.weather(for: locationManager.location!, including: .daily(startDate: firstDay, endDate: lastDay) ) } }
2
0
666
Oct ’23
Structured logging with emoji or objectdescription
When running the code below, only the first entry gets logged. Structured logging seems not to work when there are emoticons or object descriptions in the message. Is this by design? let logger = Logger(subsystem: "TestSystem", category: "TestCategory") logger.log("👍") // Result = 👍 let someEmoji:String = "👎" logger.log("\(someEmoji)") // Result = empty log line let someObjectDescription:String = String(describing:self) logger.log("\(someObjectDescription)") // Result = empty log line
3
0
1.2k
Oct ’23
Missing string catalog
I have an App with multiple string catalogs. I mistyped the name of a table in one of my String(localized: "Some English Text", table "nonExistingTable") instances. I did not receive a compile-time warning telling me the table was missing and my application defaulted to the English text instead. Is this expected behaviour or a bug?
1
0
1k
Aug ’23