Skip to content
Back

Realtime Database suddenly stops working for a while in iOS

  • 0
  • Apple
Pete
28 Oct, 2024, 17:50

So I used AppWrite SDK to write a simple news app with Live Updates using Realtime database. I have added the related SDK, setup the code and related class. It works from the beginning. I launched the app, the real time database updates with the latest data instantly when anything changes on AppWrite.

But if I opened the app, stay there in the interface, doesn't touch or change anything, the realtime update will not update after one or two minutes. I understand I can add a refresh button and to be honest, usually no users will open the app for that long. It's still disappointing if Appwrite SDK really doesn't stay alive that quick. May be I did something wrong or anything, so I am posting the code here for your reference. I call this class as Singleton and put that in the interface. After one or two mins, line 57 is not printing at all.

I am using iOS 18.1 + Xcode 16.1. No VPN is connected during testing.

TL;DR
Realtime database stops updating in iOS app after a few minutes of inactivity. The developer used AppWrite SDK for live updates. The issue may be related to how the SDK is implemented. Solution: Consider adding a refresh button and review the code to ensure the SDK stays active.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more