我有一个通过FTP下载的NSMutableArray。数组中的元素是CFFTPStream resource constants,它们的类型为CFStringRef。(Objective C)从NSMutableArray获取CFstringRef
我想从“kCFFTPResourceName”常量创建一个字符串。然而,对于Objective C和iphone开发来说,我很困难。我已经做了
一切都导致了ARC抛出一个合适的或类似错误:
2013-01-03 15:31:44.874 Street Light Reporter[1382:11603] -[__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance 0x6e1e930
2013-01-03 15:31:44.875 Street Light Reporter[1382:11603] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary objectAtIndex:]: unrecognized selector sent to instance 0x6e1e930'
我最近的尝试是: CFStringRef * C = [AR objectAtIndex:4]。 这不工作有以下两个原因:
Incompatible pointer types initializing 'CFStringRef *' (aka 'const struct __CFString **') with an expression of type 'id'
和
Implicit conversion of an Objective-C pointer to 'CFStringRef *' (aka 'const struct __CFString **') is disallowed with ARC
我已经试过各种类型转换,并与(__bridge)和诸如此类的东西乱搞,我有没有运气。
有人可以帮我吗?任何帮助将不胜感激。
提示:向我们展示从JSON解码器获取的对象的源JSON字符串(至少前50个字符左右)或NSLog。 –