AppDelegate.mm 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright © 2014-2024 PDF Technologies, Inc. All Rights Reserved.
  2. //
  3. // THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
  4. // AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE ComPDFKit LICENSE AGREEMENT.
  5. // UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
  6. // This notice may not be removed from this file.
  7. //
  8. #import "AppDelegate.h"
  9. #import <React/RCTBundleURLProvider.h>
  10. @implementation AppDelegate
  11. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  12. {
  13. self.moduleName = @"CompdfkitPdfExample";
  14. // You can add your custom initial props in the dictionary below.
  15. // They will be passed down to the ViewController used by React Native.
  16. self.initialProps = @{};
  17. return [super application:application didFinishLaunchingWithOptions:launchOptions];
  18. }
  19. - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
  20. {
  21. return [self bundleURL];
  22. }
  23. - (NSURL *)bundleURL
  24. {
  25. #if DEBUG
  26. return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
  27. #else
  28. return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
  29. #endif
  30. }
  31. @end