我有一個通過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。 –