-
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
Determine when all buckets have been indexed? #300
Comments
This delegate method will get hit, as soon as indexing is complete, which is where you could hook up the process you've outlined. In order to solve this, without waiting for the index to be retrieved, you could run a quick CoreData fetch, check if the objects are already there, and if not, insert them. In order not to create duplicates, your objects should have predictable simperiumKeys. However: I've added this ticket to implement a mechanism that would allow you to disable the "Rebase Local Changes", when the object already exist remotely. |
The delegate method notifies about one bucket only. Is there a way to determine when all of them are indexed ? Is there a way to predictably create the simperiumKey ? Can I use the hash of some values as simperiumKey ? |
@codeboost I'm afraid there is no -all buckets ready- callback, at least not for now!. You can use any function you wish to calculate + set your simperiumKey attributes. Probably a hash of some values will do the trick, for this scenario. Please, bear in mind that if you proceed implementing that mechanism (predictable keys!), until this issue is closed, remote entities will get overwritten by the local values of your objects. |
Thanks, I'll keep an eye on that issue and hopefully it will work out of the box. |
Closing this issue in favor of #301. |
The problem:
When the app is first started, I need to know:
If there is no previous data, my app creates some default objects. However, those objects will be duplicated if previous data existed and simperium downloads it.
My idea is to show a spinner while the buckets are downloaded and not let the user interact with the app during this time.
Is there a better way to do this ?
The text was updated successfully, but these errors were encountered: