WidgetKit / SwiftUI Text Timer Bug. This has remained a bug for a very long time.

Normal behavior in apps and widgets : [.date, .time]

Use "multilineTextAlignment" on widgets : [.relative, .offset, .timer]

As of iOS 16.0 (20A5358a), ".timer" does not work in widgets and does not alignment.

There was a problem that the Timer was not aligned in the widget for a long time.

I thought this bug would be fixed someday, but one more bug was added.

This is a really disappointing result.

struct WZEntryView : View {
  var entry: Provider.Entry

  var body: some View {
    VStack(alignment: .trailing) {
      Text(entry.date, style: .date)
      Text(entry.date, style: .time)
       
      Text(entry.date, style: .relative)
      Text(entry.date, style: .offset)
      Text(entry.date, style: .timer) //<- not work on iOS 16.0 (20A5358a) widget
    }
    .multilineTextAlignment(.trailing) // Bypass bugs in widgets
    .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .center)
    .background(Color.gray)
  }
}

[Test environment]

macOS : 13.0 (22A5331f)

XCode : 14.0 beta 6 (14A5294g)

iOS : 16.0 (20A5358a)

Same problem with me as well. Neither alignment, nor .timer works.

I have exactly the same problem, neither alignment, nor .timer works in real device but it works in simulator fine.

Hi, we are aware of the issue. Please follow the iOS 16 beta release notes for updates on when this will be fixed.

Hi there - is there a further update on this issue? I couldn't see any mention of this in either iOS 16 RC or Xcode 14 RC release notes.

Additionally - at least for me - when used in widgets, .timer Text fields no longer count down.

FB11472058

Same here - has made my widget completely unusable.

I can't believe they released this bug. What is happening?

Seems the issue is fixed with version of iOS 16.1 beta

A few of us are still seeing problems, discussed in this thread.

Same issue still persist

WidgetKit / SwiftUI Text Timer Bug. This has remained a bug for a very long time.
 
 
Q