我正在將支持ios 5的項目轉換爲ios 4並遇到一些困難。 它使用類AFNetworking
,我的問題是在下面一行:將NSJSONSerialization轉換爲ios 4
的iOS 5:(偉大工程)
self.responseJSON =[NSJSONSerialization JSONObjectWithData:self.responseData options:0 error:&error];
因爲NSJSONSerialization
中的iOS 4不支持我使用的是這樣的:
self.responseJSON = AFJSONDecode(self.responseData, &error);
什麼給我的錯誤:
Undefined symbols for architecture i386:
"_AFJSONDecode", referenced from:
-[AFJSONRequestOperation responseJSON] in AFJSONRequestOperation.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
您是否真的有很好的理由支持iOS 4?保持現有應用程序的兼容性我可以理解,但_現在_添加它? – jrturton