minimumScaleFactor for Text in widgets scales the text.

Hi,

In my widgets, I use minimumScaleFactor to ensure that my text is readable.

In iOS 18.0 beta 6 and iOS18.0 beta 7, my texts suddenly became very small.

It seems that minimumScaleFactor acts like if it was applying the given scale value to the text.

  • minimumScaleFactor(0.1) seems to display the text 90% smaller than the text without calling minimumScaleFactor.
  • minimumScaleFactor(0.5) seems to display the text 50% smaller than the text without calling minimumScaleFactor.

Is this a bug, of is there an unexpected change in the API ?

Edit : I have created FB14890220, in case this message remains unseen.

Answered by DTS Engineer in 801232022

@PacoLabs Thank you for submitting the bug report. This is a known issue, I recommend monitoring the beta releases and continuing to test the app. Please update your bug report with any new findings regarding this behavior.

It only seems to appear with texts created with the .timer DateStyle . Bug can be seen with the following widget code.

struct WidgetBugEntryView : View {
    var entry: Provider.Entry

    var body: some View {
        VStack {
            Text("Timer OK:")
            Text(entry.date, style: .timer)

            Text("Timer Bug:")
            Text(entry.date, style: .timer).minimumScaleFactor(0.3)

            Text("Emoji:")
            Text(entry.emoji)
        }
    }
}

Accepted Answer

@PacoLabs Thank you for submitting the bug report. This is a known issue, I recommend monitoring the beta releases and continuing to test the app. Please update your bug report with any new findings regarding this behavior.

This is still happening in iOS 18 beta 8 (August 28 release). Are there any specific workarounds or ways to avoid this behavior?

Problem is still there with Xcode 16 RC's simulator, so with iOS 18 RC I suppose ...

No fix, no workaround, no feedback at all in FB14890220.

This bug it breaking my app's main purpose to display a time based counter in a widget.

Disappointing.

In Xcode 16 RC, the Simulator version is 18.0 (22A3351), and the SDK version is 18.0 (22A348).

But, In the https://developer.apple.com/download/ page, iOS 18 RC id Build 22A3354.

So hopefully the problem is fixed on the device even it it isn't in the simulator.

EDIT: the bug is on the device too.

Looks like the issue has been fixed in iOS 18.1 (22B5034e) Developer Beta.

What happens if you use the countsDown Timer method?

Same problem with the countsDown Timer method.

But I can confirm that the bug is fixed in iOS 18.1 beta.

minimumScaleFactor for Text in widgets scales the text.
 
 
Q