到项目根目录package.json
文件所在目录下,
执行 yarn
然后通过Xcode或者Android studio 运行项目即可
由于react-native版本问题,运行demo的时候,可能会遇到报错。
Make sure you’re running a packager server or have included a .jsbundle file in your application
到项目根目录下package.json
文件所在的目录下
执行
npm install -g react-native-git-upgrade
react-native-git-upgrade
Unknown argument type 'attribute' in method -[RCTUIManager setJSResponder:blockNativeResponder:]
路径: /node_modules/react-native/React/Base/RCTModuleMethod.mm.
文件
找到 static BOOL RCTParseUnused
这个方法
替换成
static BOOL RCTParseUnused(const char **input)
{
return RCTReadString(input, "__unused") || RCTReadString(input, "__attribute__((__unused__))") || RCTReadString(input, "__attribute__((unused))");
}