CLKRelativeDateTextProvider values get truncated in circular complications

Previously the complication would say e.g. "23m" if there was 23 minutes until the taget date. In WatchOS 5, it says "2..". Am I doing something wrong or is this an Apple bug?


Here's how I create the date provider:

CLKRelativeDateTextProvider(date: targetDate, style: .naturalAbbreviated, units: [.hour, .minute, .second])

Replies

I am still experiencing this bug on watchOS 6.2.1 for CLKComplicationTemplateGraphicCircularOpenGaugeRangeText.


Submitted a feedback and sample project with this code: FB7318087

I didn't try, but:


- how have you defined size for the label ? Size to Fit content ? With minScale set to 0.8 for instance.

May be the font has changed slightly and is just a bit wider.


- try also style: .

offsetShort

This is still a bug in watchOS 8. I relied offsetShort but still same problem. It displays fine in the simulator as "28M", but on a real device, it insists in trying to display "28 MIN" which gets truncated to "28..."

You can run it in a simulator and real device to see the issue:

CLKComplicationTemplateGraphicCircularOpenGaugeSimpleText(
  gaugeProvider: CLKTimeIntervalGaugeProvider(
    style: .ring,
    gaugeColors: nil,
    gaugeColorLocations: nil,
    start: Date() - 2000,
    startFillFraction: 1,
    end: Date() + 2000,
    endFillFraction: 0
  ),
  bottomTextProvider: CLKSimpleTextProvider(text: "AB"),
  centerTextProvider: CLKRelativeDateTextProvider(
    date: Date() + 1200,
    style: .naturalAbbreviated,
    units: [.hour, .minute]
  )
)

Submitted a feedback and sample project with this code: FB9974072