Web Developer
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.