最近修改一个老项目,出现了一个报错问题。困扰了很久。现在终于找到解决方法了。分享一下。
正常的项目,使用pod引入EZOpenSDK之后就开始报错了,下面就是错误信息:
could not build module foundation错误
could not build module UIKit错误
could not build module NSString错误
等等一大堆错误。
百度了很久,查询到一个有用的方法。
找到项目的.pch文件,将 #ifdef OBJC 和 #endif添加进去。
注意,一定要放在最外层。否则无效。
#ifdef OBJC
#ifndef ShopService_pch
#define ShopService_pch#pragma mark - Base Help
#import <UIkit/UIView.h>
#import <EZOpenSDKFramework/EZOpenSDKFramework.h>
#endif /* ShopService_pch /
#endif / OBJC */