Unknown argument type '__attribute__' in method -
[RCTAppState getCurrentAppState:error:].
Extend RCTConvert to support this type
Exception '*** -[__NSArrayM objectAtIndexedSubscript:]:
index 1 beyond bounds [0 .. 0]' was thrown while invoking getCurrentAppState on target AppState with params
(
2,
3
)
修改React/Base/RCTModuleMethod.mm文件下面代码在运行就可修复
static BOOL RCTParseUnused(const char **input)
{
return RCTReadString(input, "__unused") ||
RCTReadString(input, "__attribute__((unused))");
}
修改成:
static BOOL RCTParseUnused(const char **input)
{
return RCTReadString(input, "__attribute__((unused))") ||
RCTReadString(input, "__attribute__((__unused__))") ||
RCTReadString(input, "__unused");
}
网友评论