0

How is it possible for some apps on App Store to have their widgets update every second, when we all know that Apple only allows for up to 70 or so updates every 24 hours?

Here is an example of one app that does this:

https://apps.apple.com/us/app/analog-clock-widgets/id1593608656

I have been staring at it for the last 30 minutes, and it made way more than 70 updates in those 30 minutes. It is precise and it doesn't lag. It doesn't have location services or background refresh. What is worse, its seconds hand (analog clock) sweeps through it like a mechanical watch. In one minute, it probably does a couple of hundreds of refreshes. The only thing I can think of is private API. But what and how?

I tried using all kind of different code, but lately this one works for one minute updates, Credit goes to pawell02222 from this link:

Updating time text label each minute in WidgetKit

    for offset in 0 ..< 60 * 24 {
        let entryDate = Calendar.current.date(byAdding: .minute, value: offset, to: midnight)!
        entries.append(SimpleEntry(date: entryDate))
    }
Ken White
  • 123,280
  • 14
  • 225
  • 444
Aki Akic
  • 11
  • 3
  • 1
    Try setting the entryDate to Calendar.current.date(byAdding: .second, value: offset, to: midnight)! and maybe also update the for loop by multiplying the current value by 60. Currently the loop refreshes every minute because the loop runs 1440 times a day. If you have seconds, multiply it with 60. – Timo Jan 13 '23 at 08:10
  • How is about this app? I see it can display clock in real-time. https://apps.apple.com/us/app/analog-clock-widgets/id1593608656 – Hieu Bui Apr 06 '23 at 09:15
  • Hey guy. Did you find the solution? – mars Jun 30 '23 at 10:57

0 Answers0