react-native-navigation的迁移库

AppDelegate.m 764B

1234567891011121314151617181920212223
  1. #import <React/RCTBundleURLProvider.h>
  2. #import <ReactNativeNavigation/ReactNativeNavigation.h>
  3. #import <React/RCTRootView.h>
  4. #import "AppDelegate.h"
  5. #import "RNNCustomViewController.h"
  6. @implementation AppDelegate
  7. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  8. {
  9. NSURL *jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
  10. [ReactNativeNavigation bootstrap:jsCodeLocation launchOptions:launchOptions];
  11. [ReactNativeNavigation registerExternalComponent:@"RNNCustomComponent" callback:^UIViewController *(NSDictionary *props, RCTBridge *bridge) {
  12. return [[RNNCustomViewController alloc] initWithProps:props];
  13. }];
  14. return YES;
  15. }
  16. @end