magicalpanda / MagicalRecord

Super Awesome Easy Fetching for Core Data!
Other
10.8k stars 1.79k forks source link

MR_addiCloudContainerID contentNameKey '.' check is wrong #1112

Open gumbright opened 8 years ago

gumbright commented 8 years ago

If MR_addiCloudContainerID the value for contentNameKey is checked to make sure it does not contain a period. That check is wrong...and a little odd. The returned range should be checked for location == NSNotFound, the length value is meaningless at that point.

- (void) MR_addiCloudContainerID:(NSString *)containerID contentNameKey:(NSString *)contentNameKey storeIdentifier:(id)storeIdentifier cloudStorePathComponent:(NSString *)subPathComponent completion:(void(^)(void))completionBlock
{
    if (contentNameKey != nil)
    {
        NSAssert([contentNameKey rangeOfString:@"."].location == NSNotFound, @"NSPersistentStoreUbiquitousContentNameKey cannot contain a period.");   //this line changed
    }

I can't do a pull request as I have some modifications in place.