Thank you. Yes, it works by polling, but the polling happens on my server.
I tried several ways to make polling work on device, but none of them worked out. On iOS the timing of background tasks is not guaranteed, if the system decides it needs to conserve battery or CPU then your background tasks will be delayed until the device is plugged in. So I set up a simple server and proxied OGS API calls through that, the server will then poll and send out push notifications when necessary.
By the way, thank you very much for making your app open source, I have learned a lot about how to work with OGS API from your code.