一涯竟、起因:
在xcode中添加第三方庫或者源碼時(shí)候萍启,會(huì)報(bào)錯(cuò)could not build module 'XXXXXXXX'或者error: expected identifier or '(' 儒飒。之類的錯(cuò)誤草雕。而且錯(cuò)誤的類一般出現(xiàn)在系統(tǒng)類中或者import的系統(tǒng)frameWork中。
二莺债、解決方案:
一般在xocde中存在pch統(tǒng)配文件的情況下出現(xiàn)紧憾,只需在pch文件中到千,將#import的頭文件用#ifdef OBJC與#endif包裹錯(cuò)誤即可解決。
例如:
#ifdef __OBJC__
#import "AFNetworking.h"
#endif