-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support iOS 7 background updates #110
Comments
What is the state of background refresh support and do you have any example code for recommended implementation? |
Would also like to know this. Cheers Gareth |
Ref: 99bf9d3 |
@agiletortoise @gazzer82 hello there!. Background sync'ing is already implemented. We'll be updating the documentation shortly. In order to wire it, you should do something like this in your App Delegate:
In the current implementation, the 'forceSync' callback returns a boolean indicating success. So, you'd need to track yourself if new data was received. (That API might change, so we make it easier than that!). In order to track 'newDataReceived', you should set all bucket's delegate:
And do something like:
I'll keep you posted. If you see anything weird, just let me know. Thanks! |
Thanks, I'll play with this soon. |
Been thinking about this...we're not super pleased with how you have to use this, and the approach using timeouts isn't great, so we're going to push this back a bit until we have a chance to rethink some things. Generally we need to make it easier to track whether (and how many) changes are pending (#136). |
Hi @mikejohnstn any update on this implementation, don't want to spend a lot of time implementing it to have to re-write everything . . . . Thanks Gareth |
@gazzer82 hi there, Although this issue is still valid, and we be will definitely implement a cleaner API, i'm sorry to say that there hasn't been progress, yet, on this front. The 'forceSyncWithCompletion' approach, described above, is still the only way to go (for now!). |
Let's make sure #262 is addressed, before Background Fetch is officially updated + released. |
Issue #110: Updates background fetch API
API has been updated as follows. Official documentation will be refreshed shortly.
Any comments / feedback will be very welcome. Thanks everyone! |
Could be via the new multitasking API, or perhaps push notifications.
The text was updated successfully, but these errors were encountered: