我有一个通过FTP下载的NSMutableArray.数组中的元素是CFSTPStream 资源常量,类型为CFStringRef.
我想从"kCFFTPResourceName"常量创建一个String.然而,作为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'
Run Code Online (Sandbox Code Playgroud)
我最近的尝试是:CFStringRef*c = [ar objectAtIndex:4]; 哪个不起作用有以下两个原因:
Incompatible pointer types initializing 'CFStringRef *' (aka 'const struct __CFString **') with an expression of type 'id'
Run Code Online (Sandbox Code Playgroud)
和
Implicit conversion of an Objective-C pointer to 'CFStringRef *' (aka 'const struct __CFString **') is disallowed …Run Code Online (Sandbox Code Playgroud)