Hacker News new | ask | show | jobs
by alariccole 4640 days ago
A shameless plug, but my app is brand new, free, and shows comments legibly. But the #1 feature: background refresh.

It uses new APIs in iOS 7 to preload the front page before you open it.

Pivit - https://itunes.apple.com/us/app/pivit/id705715915

3 comments

Hey, developer of the app here.

I tried out your app, looks awesome — congrats! Background refresh and comments are planned for Hack Later. Feature request for Pivit : I'd love if the web view had some controls (back, forward, refresh etc.) and the comments had some contrast, it's really hard to focus to a thread.

And yes, this is a shameless plug.

The app will not preload every time new items come in. This is a common misconception about iOS 7. iOS 7 schedules these apps to run very infrequently to save battery. Some times it will take many hours to do a background refresh.
I've got a few apps built using this API, so I can chime in. It is definitely based on usage patterns--the more you use a particular app, the more often it will refresh. It's also certainly based on battery life at the time, but also the requirements of the app.

With Pivit, since it's such a compact fetch, it'll happen more frequently than if you were, for instance, downloading photos. I check HN a lot, so for me, the app is always up to date. It does take a bit of learning time for the OS to know your patterns, but it is well worth it--it's really a great new API.

Oh wow. It's cool that the OS is actually smart to optimise it that way.
Or it may not even refresh at all. From the docs, it seems like it's a pretty intelligent API that optimises itself with usage.
It seems to be smartly batched with other network fetches. I did some tests using a local notification to let me know when it occurred, and it happened most often when sending an app into the background or finishing up another network task.
This is nice, but I wish the main post listing was a bit denser. It ends up with a lot of white space since it seems to be using fixed height cells which are sized for longer titles.