ReactNative599版本在高版本xcode上编译报错

错误内容:

node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:802:69: Cannot initialize a parameter of type 'NSArray<id> *' with an lvalue of type 'NSArray *__strong'

解决:

将:

- (NSArray<RCTModuleData *> *)_initializeModules:(NSArray<id<RCTBridgeModule>> *)modules

改成


- (NSArray<RCTModuleData *> *)_initializeModules:(NSArray<id> *)modules

参考:https://github.com/facebook/react-native/issues/31412