且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

react-native RCTBridgeModule 的初始化

更新时间:2023-11-19 19:50:22

我通过覆盖 init 方法使其工作.这现在也有记录(有点https://facebook.github.io/react-native/docs/native-modules-ios#dependency-injection).

I got it working by overriding the init method. This is now also documented (kind of https://facebook.github.io/react-native/docs/native-modules-ios#dependency-injection).

- (instancetype)init
{
  self = [super init];

  NSLog(@"Do some stuff here");

  return self;
}