更新xcode到11版本之后,跑之前xcode10版本的项目,提示
报错为:
Unknown argument type ‘attribute’ in method -[RCTAppState getCurrentAppState:error:]. Extend RCTConvert to support this type
这是因为xcode11引起的
解决办法
xcode打开项目
找到Base文件夹下的这个目录
找到下图代码部分,修改之前没有箭头指向的那一行代码,添加箭头指向的那段代码就ok了,。
static BOOL RCTParseUnused(const char **input)
{
return RCTReadString(input, “__unused”) ||
RCTReadString(input, "__attribute__((__unused__))") ||
RCTReadString(input, "__attribute__((unused))");
}