NSFileManager creando el error de directory 518 NSFileWriteUnsupportedSchemeError

Estaba tratando de crear un directory

NSError*error=nil; NSString* BIDirectory=[[NSSearchPathForDirectoriesInDomains(NSCachesDirectory,NSUserDomainMask,YES) objectAtIndex:0] stringByAppendingPathComponent:@"BI"]; BOOL isDir,flag=YES; //if the directory doesn't exist create it. if(!([[NSFileManager defaultManager] fileExistsAtPath:BIDirectory isDirectory:&isDir]&& isDir)) flag=[[NSFileManager defaultManager] createDirectoryAtURL:[NSURL URLWithString:BIDirectory] withIntermediateDirectories:YES attributes:nil error:&error]; 

tengo el siguiente error

 enter code hereError Domain=NSCocoaErrorDomain Code=518 "The operation couldn't be completed. (Cocoa error 518.)" UserInfo=0x197190 {NSURL=/var/mobile/Applications/55793654-6CDB-4B07-8FBF-553DC37D583D/Library/Caches/BI} 

tal vez la url está mal?

En lugar de

  [NSURL URLWithString:BIDirectory] 

por favor use

  [NSURL fileURLWithPath:BIDirectory] 

es incorrecto usar URLWithString: BIDirectory en files locales