How are some apps updating widgets every second?

260 Views Asked by At

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))
    }
0

There are 0 best solutions below