iOS 16.0 beta 7 broke Text(Date(), style: .timer) in SwiftUI widgets

Hi, In my apps, the recent iOS 16.0 beta 7 (20A5356a) broke the .timer DateStyle property of the Text view, in a SwiftUI widget.

In previous OS and beta, Text(Date(), style: .timer) was correctly displaying an increasing counter.

In iOS 6.0 beta 7, Text(Date(), style: .timer) does not update anymore, (and is offset to the left).

The other DateStyle (like .offset, .relative, ...) seems to update correctly.

Anyone noticed that (very specific) problem ?

Post not yet marked as solved Up vote post of PacoLabs Down vote post of PacoLabs
8.1k views

Replies

The timers on all my Home Screen widgets are working correctly in iOS 16.1 beta 2. Timers in Lock Screen widgets, however, are not working.

EDIT: And... after about five minutes, the timers have all stopped working. Jeez, Apple. How hard is it to have a timer work properly on your widgets? It was fine in iOS 14 and 15...

  • There is also a problem with the home screen widget. Adding 3 widgets with timers works fine at first. If you change the screen and turn the power on and off several times, some out of the three work and some do not.

    It seems that only the widgets of macOS and watchOS are working normally.

    XCode : 14.1 beta 2 (14B5024i)

    macOS : 13.0 beta 8 (22A5352e)

    iOS : 16.1 beta 2 (20B5050f)

    watchOS : 9.1 beta 2 (20S5049d)

Add a Comment

My feedback changed to potentially fixed in coming OS update.

FB11582170

Did someone tried latest build of 16.1?

  • Test in iOS 16.1 beta 3, i think it is fixed!

  • I tested briefly using the simulator and physical device, and everything (Home and Lock Screen) worked for me too. Though I have not tried any complex scenarios as others have described above/before.

Add a Comment

I just commented above things seem to be working... but I remembered the always on display and decided to try it out. (On the simulator only). When I have my Lock Screen timer widget running and lock the simulator (from the menu), the display changes from a timer to something like "<1 minute" and just stays there without changing. When I unlock the device (but not return to the home screen) the widget shows the time again (like, "0.45", but it does not change after that (it no longer counts on the Lock Screen).

Beyond the frozen counter issue, is the always-on Lock Screen not going to allow counting in real time and instead just show an approximate time (with units)? I really did not leave enough room for units in my widget.

  • This sounds awful for me as well, because I use multiple .timer and .relative.

    And still not get always-on display. What a waste of energy. Most people have a watch anyway.

Add a Comment

While it is much better, I still have the stop of the timer with iOS 16.1 Beta 3 from times to times (but it is hard to reproduce as it is quite random)

Playing with the phone by going to the some pages after, some pages before, locking the screen, can make the issue appear. But changing the page again will make the timer continue at next display.

The issue seems to be fixed on the released versions of iOS 16.1 and iPadOS 16.1.

  • Lock Screen "Inline" widgets are still broken. All other widgets seem to work okay.

Add a Comment

I've just tested it on iOS 16.1.2 and widget with .timer date style property works well 🔥

This issue still persists for me. Occasionally on the simulator (and even a physical test device), the .inline or .timer styles will count every second, but usually it freezes the second count and doesn't refresh until you change screens and change back. Seems to revert to updating the text every minute or so. Disappointing... at the very least, there should be an option to configure what fields are displayed in the text style (i.e. don't show seconds, especially if we can't expect them to be in real-time).

I am having issues with the always-on screen changing the 3:44:22 to '3 hours 44 minutes' which is way too long for the widget. Has anybody managed so find a solution for this issue on the always-on screen? I notice the apple timer shows this as 3:44:-- which is a much better presentation for a widget. I understand wanting to drop the seconds update in always-on for battery life but why such a long string? Makes it unusable.