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)

Post not yet marked as solved Up vote post of Jun Sang Hyun Down vote post of Jun Sang Hyun
3.2k views

Replies

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, We are now 2 days before the iOS16 public release. Will this known bug be delivered to everybody on Monday, or can we expect a last minute fix ?

  • Really bad news. Seems some issue stay in iOS 16.1 beta, when you swipe home screen page from one to another, the timer stopped to update.

Add a Comment

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. Still not fixed in iOS 16 RC.

  • Same here

  • Same here. I'm disappointed.

Same here - has made my widget completely unusable.

  • Same here, Not fixed

Add a Comment

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

  • This is really so disappointing , How can they just release this bug, My Widget has just become useless.

Add a Comment

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