今天在使用CocoaPod导入ReactiveCocoa和Mantle三方库文件时,出现了一个问题,提示metamacros.h file not found,后来经过Google找到了答案,特此记录一下,点击这里
1.cocoapods导入ReactiveCocoa和Mantle出现的这个问题,其他的 没有这个问题

后来找到原因了,如下图所示,两个三方库文件出现了同样的文件,后来经查找发现是ReactiveCocoa的podspec问题,

解决办法就是在podfile文件中改变ReactiveCocoa的podspec文件,在pod 'ReactiveCocoa'后面加上 :podspec => 'https://gist.githubusercontent.com/PaulTaykalo/04f8e2ee25b9d57f03455ccafd541b34/raw/e94f3bec7a9450ecd0f0cdc9b4899deb0b91d758/ReactiveCocoa.podspec.json'
如下图所示

意思就是在ReactiveCocoa的metamacros.h重命名为RACmetamacros.h,在看ReactiveCocoa下的metamacros.h文件,是不是变了

网友评论