更新xcode11之后react-native跑项目报错问题

更新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))");

}

猜你喜欢

转载自blog.csdn.net/The_Small_White/article/details/102695231