Hello, I am trying to add an iOS native module inside an existing React Native app.
In the native module, I would need to collect step data every hour in the background, and then send the post request to the database. However, if the user doesn’t have a network available, the data should be kept in a queue waiting for the earliest possible opportunity, e.g when the network is active in the next time the phone tries to post.
Would you have any suggestions on how this could be implemented?
Should I persist the data in JSON file writing to phone storage, or use UserDefaults, or Core Data?
Thanks a lot!