【发布时间】:2019-06-16 00:10:01
【问题描述】:
我正在尝试在 iOS 中将 RNN(React Native Navigation)与 RNCK(React Native CallKit)集成。
问题是它们中的每一个都需要在 Xcode 项目的 AppDelegate 中进行独特的设置。
两个都需要jsCodeLocation:
NSURL *jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
RNN 设置:
[ReactNativeNavigation bootstrap:jsCodeLocation launchOptions:launchOptions];
RNCK 设置:
RNCallKit *rncallkit = [[RNCallKit alloc] init];
RCTBridge *bridge = [[RCTBridge alloc] initWithBundleURL:jsCodeLocation
moduleProvider:^{ return @[rncallkit]; }
launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"MyApp"
initialProperties:nil];
我看到this (outdated) issue in RNCK repo,这导致this (also outdated) issue,并且都在谈论RNN 1,而在RNN 2中,这个设置被简化了,除了分叉RNN之外,我没有看到将这两个框架集成到一个项目中的正确方法并添加一个单独的初始化程序,它将接收moduleProvider...
【问题讨论】:
标签: ios react-native wix-react-native-navigation