lhunath / UbiquityStoreManager

Implements Core Data + iCloud, deals with all the nasty stuff and gives you a clean API.
http://lhunath.github.io/UbiquityStoreManager
Apache License 2.0
391 stars 37 forks source link

The store gets reloaded twice #52

Closed NorbNorb closed 10 years ago

NorbNorb commented 10 years ago

The following code block taken from the current revision reloads the store twice (code summary):

- (void)setCloudEnabled:(BOOL)enabled {
...
    [[NSUserDefaults standardUserDefaults] setBool:enabled forKey:USMCloudEnabledKey];
    [self reloadStore];
}

- (void)userDefaultsDidChange:(NSNotification *)note {
    if (self.cloudWasEnabled != self.cloudEnabled)
        [self reloadStore];
}

Is this intended?

lhunath commented 10 years ago

No, that is unintended. If the store is reloaded twice there, the top reloadStore should be removed.

NorbNorb commented 10 years ago

Thanks for your reply! Will you fix this in your source?

lhunath commented 10 years ago

Should be fixed by ef9aa1c