Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Import Duplicates when using iCloud #651

Open
KennyVB opened this Issue · 0 comments

1 participant

@KennyVB

i’m using your import method as following BUT it gives me duplicates as soon as i turn on iCloud. if only using localstore it works fine

 NSString *path = [[NSBundle mainBundle] pathForResource:@“hovedMenu” ofType:@“plist”];
    NSData *xmlData;
    NSString *error;
    xmlData = [NSPropertyListSerialization dataFromPropertyList:path
                                                         format:NSPropertyListXMLFormat_v1_0
                                               errorDescription:&error];

    NSPropertyListFormat format;
    NSData *dataFromFile = [NSData dataWithContentsOfFile:path];
    NSArray *arrayFromFile = nil;
    if (dataFromFile) {
        arrayFromFile = [NSPropertyListSerialization propertyListFromData:dataFromFile
                                                         mutabilityOption:NSPropertyListMutableContainers
                                                                   format:&format
                                                         errorDescription:NULL];
    }

    if(xmlData) {
        NSLog(@“No error creating XML data.”);
Hovedmenu MR_truncateAll]
        [Hovedmenu MR_importFromArray:arrayFromFile];
    }
    else {
        NSLog(@“%@“,error);
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.