0

I have a timer running in my app. When the app goes in background I realized I need to removeFilePresenter because otherwise the process is killed and when I am back in foreground my table cannot reload data.

How can I do that and reload my graph database as soon as the app comes back to foreground?

Thanks!

1 Answer 1

0

You can reload your data in the viewDidLoad, or viewDidAppear lifecycle calls in any view controller. Even with many instances of Graph, it will always reference a single instance under the hood, so you don't have to worry about duplication or poorly managed resources.

Sign up to request clarification or add additional context in comments.

3 Comments

Thank you so much. In fact the table was already reloading correctly (but not in the simulator, and I don't know why). Now I am trying to figure out how to force a sync with iCloud. If my database Is on my iPhone and then I install the app on an iPad, the database is indeed synced. But is it enough for me to ask for a db.sync anytime to force the sync to happen when the user install the app on a second device for the first time? Thanks again in advance. Great work!!
Thank you! For your immediate sync question, are you asking the best way to sync immediately and to decrease the latency on syncing?
Sorry, I missed your second answer. Yes, I was trying to sync decreasing latency. Best!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.