Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

Bug #13

Open
LittleOrangeC opened this issue Jul 24, 2013 · 1 comment
Open

Bug #13

LittleOrangeC opened this issue Jul 24, 2013 · 1 comment

Comments

@LittleOrangeC
Copy link

I see on your site there were several comments about keys being more than 64 utf8 chars. Have you resolved that issue?

I'm seeing this error in Flurry:
NSInvalidArgumentException: NSUbiquitousKeyValueStore: key 'com.apple.audio.CoreAudio.HogMode.Owner-WM8758 Input Device audio0' is too long.
Msg: Crash!

@swaterfall
Copy link

Turns out apple put loads of their own stuff in user defaults and some of the keys are too long for iCloud. Here is a quick fix.

+(void) updateToiCloud:(NSNotification*) notificationObject {
...    
    [dict enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {

      if ([key rangeOfString:@"com.apple"].location == NSNotFound) {
            [[NSUbiquitousKeyValueStore defaultStore] setObject:obj forKey:key];
       }
    }];
...
}

+(void) updateFromiCloud:(NSNotification*) notificationObject {
..
    [dict enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
        if ([key rangeOfString:@"com.apple"].location == NSNotFound) {
            [[NSUserDefaults standardUserDefaults] setObject:obj forKey:key];
        }
    }];
..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants