I want a way please to delete, change, or edit values automatically after a certain time in the database of the Firebase in swift.
Asked
Active
Viewed 43 times
0
-
2We will need to see your attempt at fixing your problem before we as a community can help. Stack Overflow isn't a code writing service. – scb998 May 29 '17 at 05:22
-
@scb998 often wanna say it to some users.. – Vlad Pulichev May 29 '17 at 05:27
-
The Firebase Database does not have a built-in time-to-live. Here's an answer where I showed how to do something like that in JavaScript: https://stackoverflow.com/questions/32004582/delete-firebase-data-older-than-2-hours – Frank van Puffelen May 29 '17 at 14:40
-
Thank you for your help but i am beginner and i only know swift. Please Do you know how to make it in swift ? – Swift man May 29 '17 at 15:41
-
@FrankvanPuffelen Doesn't that snippet of code need to be run manually from time to time (from a client)? There are ways of automating that task with cloud functions. Please see [What Can I Do with Cloud Functions?](https://firebase.google.com/docs/functions/use-cases#perform_database_sanitization_and_maintenance). You won't be able to do this task with Swift directly, however, you can leverage a service like Zapier to assist with cron jobs. – Jay May 29 '17 at 19:11
-
Hey Jay. The code is the same between a JavaScript client and a Cloud Function. And unfortunately there are no cron-job/time-triggered Cloud Functions yet. :-/ – Frank van Puffelen May 29 '17 at 19:13