AppDelegate.mm 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #import "AppDelegate.h"
  2. // @generated begin react-native-maps-import - expo prebuild (DO NOT MODIFY) sync-f2f83125c99c0d74b42a2612947510c4e08c423a
  3. #if __has_include(<GoogleMaps/GoogleMaps.h>)
  4. #import <GoogleMaps/GoogleMaps.h>
  5. #endif
  6. // @generated end react-native-maps-import
  7. #import <React/RCTBundleURLProvider.h>
  8. #import <React/RCTLinkingManager.h>
  9. @implementation AppDelegate
  10. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  11. {
  12. // @generated begin react-native-maps-init - expo prebuild (DO NOT MODIFY) sync-cc34ca18e2849703700b355a9bd0adf4247f82af
  13. #if __has_include(<GoogleMaps/GoogleMaps.h>)
  14. [GMSServices provideAPIKey:@"AIzaSyAkfen-gfGOQyA9ui0_OjOS6TrA5-viBMI"];
  15. #endif
  16. // @generated end react-native-maps-init
  17. self.moduleName = @"main";
  18. // You can add your custom initial props in the dictionary below.
  19. // They will be passed down to the ViewController used by React Native.
  20. self.initialProps = @{};
  21. return [super application:application didFinishLaunchingWithOptions:launchOptions];
  22. }
  23. - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
  24. {
  25. return [self bundleURL];
  26. }
  27. - (NSURL *)bundleURL
  28. {
  29. #if DEBUG
  30. return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@".expo/.virtual-metro-entry"];
  31. #else
  32. return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
  33. #endif
  34. }
  35. // Linking API
  36. - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
  37. return [super application:application openURL:url options:options] || [RCTLinkingManager application:application openURL:url options:options];
  38. }
  39. // Universal Links
  40. - (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler:(nonnull void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {
  41. BOOL result = [RCTLinkingManager application:application continueUserActivity:userActivity restorationHandler:restorationHandler];
  42. return [super application:application continueUserActivity:userActivity restorationHandler:restorationHandler] || result;
  43. }
  44. // Explicitly define remote notification delegates to ensure compatibility with some third-party libraries
  45. - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
  46. {
  47. return [super application:application didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
  48. }
  49. // Explicitly define remote notification delegates to ensure compatibility with some third-party libraries
  50. - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
  51. {
  52. return [super application:application didFailToRegisterForRemoteNotificationsWithError:error];
  53. }
  54. // Explicitly define remote notification delegates to ensure compatibility with some third-party libraries
  55. - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
  56. {
  57. return [super application:application didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
  58. }
  59. @end