Post

Replies

Boosts

Views

Activity

VoiceOver ignoring a data series when there are multiple ones
I can't figure out if I've found a VoiceOver problem with Swift Charts or if I'm doing something incorrectly. I have a loop within a loop showing 2 sets of data in the same chart. If I touch a month then VO correctly says there are two data series. But if I keep swiping down only data from the first series is read. ChatGPT said try referencing the outer loop and sure enough that worked if it done in BOTH the label and value. It sounds really awkward though. For example, "High 89 degrees F High October". Below the "bad" chart only says something such as "92 degrees F October" when swiping down. The "good" chart will read the high and low temperature data. VStack { headerText("BAD") Chart { ForEach(processedMonthlyInput) { oneMonth in ForEach(oneMonth.temperatures, id: \.month) { element in LineMark( x: .value("Month", element.month, unit: .month), y: .value("Temperature", element.tempVal.converted(to: .fahrenheit).value) ) .accessibilityLabel("\(element.month.formatted(.dateTime.month(.wide)))") .accessibilityValue(Text("\(element.tempVal.converted(to: tempUnit).formatted(.measurement(width: .abbreviated, numberFormatStyle: .number.precision(.fractionLength(0)))))")) } .symbol(by: .value("Type", oneMonth.theType)) .foregroundStyle(by: .value("Type", oneMonth.theType)) .interpolationMethod(.catmullRom) } } .frame(maxHeight: paddingAmount) .padding(.horizontal) headerText("GOOD") Chart { ForEach(processedMonthlyInput) { oneMonth in ForEach(oneMonth.temperatures, id: \.month) { element in LineMark( x: .value("Month", element.month, unit: .month), y: .value("Temperature", element.tempVal.converted(to: .fahrenheit).value) ) .accessibilityLabel("\(oneMonth.theType) \(element.month.formatted(.dateTime.month(.wide)))") .accessibilityValue(Text("\(oneMonth.theType) \(element.tempVal.converted(to: tempUnit).formatted(.measurement(width: .abbreviated, numberFormatStyle: .number.precision(.fractionLength(0)))))")) } .symbol(by: .value("Type", oneMonth.theType)) .foregroundStyle(by: .value("Type", oneMonth.theType)) .interpolationMethod(.catmullRom) } } .frame(maxHeight: paddingAmount) .padding(.horizontal) }
0
0
481
Sep ’24
Problems trying to call reloadAllTimelines() multiple times from an AppIntent
My app focuses on a particular day and in the app I have arrow buttons that let you switch to the next or previous day. When one of them is pressed I call WidgetCenter.shared.reloadAllTimelines(). Almost immediately, regardless of how many times they are pressed, I will usually see my widgets immediately update to reflect the new day. I thought it would be nice to extend this functionality to Lock Screen controls. I had the AppIntent the Lock Screen buttons use call some of the same code that the arrow buttons in my app do, which includes a call to WidgetCenter.shared.reloadAllTimelines(). In the simulator it seemed to work great. I could see my Lock Screen widgets update almost immediately to focus on the new day. However, when I tried it on an actual device it was a much different story. Usually the first button press will update the widgets but after that it can be much, much longer before the Lock Screen widgets eventually refresh. It makes sense that the system is probably throttling my requests but is there a way to prevent this so that my Lock Screen controls operate the same way as buttons in my app?
0
0
343
Sep ’24
VoiceOver ignoring UICalendarView day decorations
I'm using UICalendarView in my SwiftUI app. Inside of my func calendarView() I'm specifying emojis for decorations for certain days and they're showing up just fine. The problem is that VoiceOver completely ignores the decorations. If I touch a day it says the date and "button", which is exactly what I want. I've tried adding all of the accessibility items below but none of them cause VoiceOver to mention the day's decoration.        return .customView {         let emoji = UILabel()         emoji.text = foundEvent.emoji         emoji.isAccessibilityElement = true         emoji.accessibilityIdentifier = "identifier"         emoji.accessibilityTraits = .staticText         emoji.accessibilityLabel = "I like turtles."         emoji.accessibilityValue = foundEvent.emoji         emoji.accessibilityHint = "I also like turtles."         return emoji       }
1
1
1.3k
Sep ’22
Widgets calling WeatherService.shared.weather multiple times at the same time
Hello. I noticed pretty early on that WeatherService.shared.weather seems to cache results. I realized this when I called it, killed network connectivity to my device, and then called it again I still got results back. My concern is about my widgets, which are also able to call WeatherService.shared.weather. I put my call inside of getTimeline(). After adding logging I realized that getTimeline() is called multiple times at the same time. For example, if I have two different widgets each with three different sizes (small, large, rectangular, etc) then six calls to getTimeline() are made for an update. I found a blog by Shopify iOS developers that describes how they found the same thing, but the forums aren't letting me link to their website's blog. My questions is which of these scenarios is happening: Even though WeatherService.shared.weather is called six times in the same second it's actually only the first call that goes out via the network and the remaining five calls just returned cached results. More than one of the six calls in the same second could be making a network call. If that's the case I'm going to need to add some form of throttling/caching because the number of free API calls per month is limited. Thank you!
1
0
834
Jun ’23
Location requested in WeatherService monthlyStatistics() does NOT match the location in the response
We pass a CLLocation to the new WeatherService monthlyStatistics() BUT in the returned metadata the CLLocation data does NOT match what we sent in the request. For example, send lat -27.1480114 long -109.4273371 in the monthly stat request and get back data for lat -27.148000717163086, long -109.427001953125. There’s no mention in the documentation of the returned location being “close to” the requested location. If this is working as designed how close are the results allowed to be? In my small sample they seem to be around 45-55 meters away. I’m considering less than 100 meters away to be a match, but don’t know if that’s correct.
1
0
601
Jul ’24
Mismatch between DayWeather date and HourWeather date
A year ago I filed feedback FB13055082 about this and I just realized that it was marked as "works as currently designed". I need help understanding why this is the expected behavior. For the feedback example I used Nepal, which is +5:45 from GMT. When the UTC offset is not at an hour interval, the dates returned by DayWeather and HourWeather do not match. I’ll request weather with a start date of Aug 25 at 12:0:0 AM GMT+5:45 and end date of Sep 3 at 12:0:0 AM GMT+5:45. The first daily forecast returns a date of Aug 25, 2023 at 12:0:0 AM GMT+5:45, which is what I expect. It's midnight in Nepal and the start of the day. If in my code I call (correct calendar).startOfDay(for: ) I'll also get this same time back. However, the first hourly forecast returned is for Aug 25, 2023 at 12:45:0 AM GMT+5:45 which is NOT the start of the day in Nepal or the start I asked for. It is 45 minutes off. How is the hourly data not starting at the time I requested the expected behavior? Especially when the day data does start at the time I requested.
1
0
560
Aug ’24
Trouble using more than one color with SF Symbols in tinted mode
When a widget is using the new tinted mode in iOS 18 the Weather app shows the SF Symbols in both white and the tint color. For example, a tinted sun with a white arrow for sunrise. I can't figure out how to do this. If I add widgetAccentable to the Image(systemName:) the entire Image becomes the tint color. If I don't use it no combination of rendering mode or foreground style makes the tint color appear. I can't find any mention of this in the WWDC sessions.
1
0
695
Sep ’24
sourceImageURL in imagePlaygroundSheet isn't optional
I can't shake the "I don't think I did this correctly" feeling about a change I'm making for Image Playground support. When you create an image via an Image Playground sheet it returns a URL pointing to where the image is temporarily stored. Just like the Image Playground app I want the user to be able to decide to edit that image more. The Image Playground sheet lets you pass in a source URL for an image to start with, which is perfect because I could pass in the URL of that temp image. But the URL is NOT optional. So what do I populate it with when the user is starting from scratch? A friendly AI told me to use URL(string: "")! but that crashes when it gets forced unwrapped. URL(string: "about:blank")! seems to work in that it is ignored (and doesn't crash) when I have the user create the initial image (that shouldn't have a source image). This feels super clunky to me. Am I overlooking something?
1
0
448
Jan ’25
Confusion about units for new WeatherKit visibility items
I am really confused by some of the new data returned in WeatherKit for iOS 18. The visibility (of an object) was already being returned in HourWeather as a Measurement. iOS 18 added max/min visibility (of terrain) in DayWeather. BUT instead of a Measurement it's just a Double. HourWeather: /// The distance at which an object can be clearly seen. /// /// The amount of light and weather conditions like fog, mist, and smog affect visibility. public var visibility: Measurement<UnitLength> DayWeather's comment: /// The maximum distance at which terrain is visible for the day. /// /// The amount of light, and weather conditions like fog, mist, and smog affect visibility. @available(iOS 18.0, macOS 15.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *) public var maximumVisibility: Double This makes it sound like the new items are also a distance and not a percentage. Why wasn't Measurement used so the unit would be clear? Documentation doesn't explain this either. I'm hoping that this isn't being returned in the unit used by the current locale because my app lets you specify what unit to use for temperature, length, etc regardless of locale. Since all the temperature, length, etc data returned had used Measurement that was possible. The iOS weather app refers to the lowest/highest visibility in my preferred unit, which is miles.
1
0
401
Jan ’25
WeatherKit not returning gust in DayWeather
My SwiftUI weather app shows weather stats for the day that I'm pulling from DayWeather. I added wind speed to my app recently. I wanted to add Gusts but I hit a problem. Whenever I look at the results returned for DayWeather the "gust" inside of Wind is always nil. The iOS weather app includes gusts in a daily summary. For example, today for Pistol River, OR it says "Wind is currently 15 mph from the southeast. Today, wind speeds are 8 to 26 mph, with gusts up to 50 mph." A query I just did to WeatherKit returned 18mph with compass direction SSE but nil for gusts. I've searched the documentation and I can't determine if this is working as designed or a bug.
2
0
944
Apr ’23
Change in behavior for .isToggle trait
One of my blind users reached out to me after they updated to iPadOS 18. I have a button that is used to mark/unmark a favorite location. He said that he could still tell the favorite status via the label and hint, but VoiceOver was always saying that the switch button is off. I'm able to recreate this on my iPad as well. The documentation for .isToggle is completely blank. Basically with iPadOS 17 adding the .isToggle trait makes VoiceOver state that my button is a toggle. With iPadOS 18 adding the .isToggle trait makes VoiceOver state that my button is a toggle AND try to state its current value. I don't know if this is intentional or a bug. Button { showFavActions() } label: { Image(systemName: SFSymbolShortcut.star.rawValue) .symbolVariant(weatherData.currentlyFavIndex == nil ? .none : .fill) } .buttonStyle(.plain) .accessibilityLabel(Text(weatherData.currentlyFavIndex == nil ? "Not a favorite location." : "Favorite location.")) .accessibilityHint(Text(weatherData.currentlyFavIndex == nil ? "Add to favorites." : "Remove from favorites.")) .accessibilityInputLabels(["Favorite"]) .accessibilityAddTraits(.isToggle) // iOS 17
2
0
637
Aug ’24
Unrealistically high snowfall amounts being reported by WeatherKit
I filed FB16332997 about the VERY high snowfall estimates I'm seeing in WeatherKit and iOS Weather. I initially thought something was wrong with my weather app but I verified the numbers with the iOS Weather app and another third party weather app. For Atlanta last week it was saying 7.5" when it ended up being 2" (which I can live with). Two days ago it reported there could be 16" of snow in northern Florida. That's impossible! This morning it was reporting that Niceville could have 6-7" of snow, which would be significantly more than highest amount in recorded history for Florida (where snow is extremely rare). It almost makes me wonder if the liquid precipitation value is actually the snowfall amount in reality. And then that is incorrectly being converted to the snowfall amount.
2
0
426
Jan ’25
Should weather from the following day at midnight be used for the current day?
I just noticed something really odd with WeatherKit. If the temperate at midnight of the FOLLOWING day is colder than all temps in the day you want weather for then WeatherKit will report that as the low temperature for the day even though it's a different day. Here it's reporting the lowest temp for Feb 6 is 22F. But that's a temp from Feb 7. I'm displaying lowTemperature and lowTemperatureTime from DayWeather as well as the HourWeather in these examples. I wasn't sure if this was working as designed or a bug. I can provide raw data from this example. ----daily formatted start weather for Feb 6 High 41° high at Feb 6 at 2 PM Low 22° low at Feb 7 at 12 AM ----daily formatted end Feb 6 at 12 AM 34° Feb 6 at 1 AM 35° Feb 6 at 2 AM 36° Feb 6 at 3 AM 36° Feb 6 at 4 AM 36° Feb 6 at 5 AM 34° Feb 6 at 6 AM 33° Feb 6 at 7 AM 33° Feb 6 at 8 AM 33° Feb 6 at 9 AM 33° Feb 6 at 10 AM 35° Feb 6 at 11 AM 36° Feb 6 at 12 PM 38° Feb 6 at 1 PM 40° Feb 6 at 2 PM 41° Feb 6 at 3 PM 40° Feb 6 at 4 PM 39° Feb 6 at 5 PM 37° Feb 6 at 6 PM 36° Feb 6 at 7 PM 33° Feb 6 at 8 PM 31° Feb 6 at 9 PM 29° Feb 6 at 10 PM 27° Feb 6 at 11 PM 24° Feb 7 at 12 AM 22°
2
0
317
Feb ’25
SiriTipView showing ${APPLICATIONNAME} instead of my app's name.
Version 14.0 beta 4 (14A5284g) This is all referring to the simulator. When I run the Shortcuts app my phrase is properly shown for my app and the app's name is correctly populated. However, when I try to add a SiriTipView the same phrase shows the application name as ${APPLICATIONNAME}. I changed the first letter of the phrase and verified the change showed up in the Shortcuts app and my app tip. I'm not sure if I'm doing something wrong or should file feedback instead.
3
1
2k
Sep ’22