ios - Incompatible pointer types sending 'const CFStringRef' (aka 'const struct __CFString *const') to parameter of type 'id' -


i trying in cocoa app information of directory/files in system. method return me dictionary key attribute listed

-(nsdictionary *) metadataforfileatpath:(nsstring *) path {     nsurl *url = [[[nsurl alloc] initfileurlwithpath:path] autorelease];      mditemref itemref = mditemcreatewithurl(null, (cfurlref)url);     nsarray *attributenames = (nsarray *)mditemcopyattributenames(itemref);     nsdictionary *attributes = (nsdictionary *) mditemcopyattributes(itemref, (cfarrayref) attributenames);     cfrelease(itemref);      // leaking memory (attributenames , attributes), better check instruments      return attributes; } 

another method....

nsdictionary *dict = [self metadataforfileatpath]; nsstring *date = [dict objectforkey:kmditemfscreationdate]; 

when got warning message " incompatible pointer types sending 'const cfstringref' (aka 'const struct __cfstring *const') parameter of type 'id' " trying type cast them string still exist. didn't wrong. helpful me.

my problem solved doing

nsstring *date = [dict objectforkey:@"kmditemfscreationdate"];

anyway help.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -