AppDelegate.mm 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #import "AppDelegate.h"
  2. #import <React/RCTBundleURLProvider.h>
  3. @implementation AppDelegate
  4. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  5. {
  6. self.moduleName = @"NavMelon";
  7. // You can add your custom initial props in the dictionary below.
  8. // They will be passed down to the ViewController used by React Native.
  9. self.initialProps = @{};
  10. return [super application:application didFinishLaunchingWithOptions:launchOptions];
  11. }
  12. - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
  13. {
  14. #if DEBUG
  15. return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
  16. #else
  17. return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
  18. #endif
  19. }
  20. /// This method controls whether the `concurrentRoot`feature of React18 is turned on or off.
  21. ///
  22. /// @see: https://reactjs.org/blog/2022/03/29/react-v18.html
  23. /// @note: This requires to be rendering on Fabric (i.e. on the New Architecture).
  24. /// @return: `true` if the `concurrentRoot` feature is enabled. Otherwise, it returns `false`.
  25. - (BOOL)concurrentRootEnabled
  26. {
  27. return true;
  28. }
  29. @end