title: @react-native-firebase/messaging : TypeError: (0 , _messaging.default)(...).registerForRemoteNotifications is not a function
body: <blockquote>
  <p>I am using @react-native-firebase/app&quot;: &quot;^8.2.0&quot;, @react-native-firebase/messaging and react-native v0.61.0.
  also using @react-native-community/push-notification-ios&quot;: &quot;^1.4.0&quot; and &quot;react-native-push-notification&quot;: &quot;^4.0.0&quot;</p>
  </blockquote>
  <p>I have recently downgraded my react-native version from 0.63.0 to 0.61.0. In android everything works perfect but in ios simulator &amp;&amp; real device <code>messaging().registerForRemoteNotifications()</code> throw error.</p>
  <blockquote>
  <p>TypeError: (0 , _messaging.default)(...).registerForRemoteNotifications is not a function
  TypeError: (0 , _messaging.default)(...).registerForRemoteNotifications is not a function
  at App.componentDidMount</p>
  </blockquote>
  <p><a href="https://i.stack.imgur.com/txkzG.png" rel="noreferrer"><img src="https://i.stack.imgur.com/txkzG.png" alt="enter image description here" /></a></p>
  <p><strong>React-Native Info</strong></p>
  <blockquote>
  <p>System:
  OS: macOS 10.15.5
  CPU: (4) x64 Intel(R) Core(TM) i5-3470S CPU @ 2.90GHz
  Memory: 45.55 MB / 16.00 GB
  Shell: 3.2.57 - /bin/bash
  Binaries:
  Node: 12.15.0 - /usr/local/bin/node
  npm: 6.13.4 - /usr/local/bin/npm
  Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
  iOS SDK:
  Platforms: iOS 13.5, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
  IDEs:
  Xcode: 11.5/11E608c - /usr/bin/xcodebuild
  npmPackages:
  react: 16.9.0 =&gt; 16.9.0
  react-native: 0.61.0 =&gt; 0.61.0
  npmGlobalPackages:
  react-native-cli: 2.0.1</p>
  </blockquote>
  <p>My <code>App.js</code> file</p>
  <pre><code>const hasPermissions = await messaging().hasPermission()
      if (hasPermissions) {
        await messaging().registerForRemoteNotifications()
        await new Promise((resolve, reject) =&gt; setTimeout(() =&gt; resolve(), 1000))
  
        token = await messaging().getToken()
        let fctk = `getting fcm token ${token}`
        Alert.alert(fctk)
        console.log('FCM token', token)
      } else {
        const { status } = await requestNotifications(['alert', 'sound'])
  
        if (status === 'granted') {
          await messaging().registerForRemoteNotifications()
          await new Promise((resolve, reject) =&gt; setTimeout(() =&gt; resolve(), 1000))
  
          token = await messaging().getToken()
          let fctk = `getting fcm token ${token}`
          Alert.alert(fctk)
          console.log('FCM token has been received', token)
        }
      }
  </code></pre>
  <p>my <code>AppDelegate.m</code> file</p>
  <pre><code>/**
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */
  #import &lt;Firebase.h&gt;
  #import &quot;AppDelegate.h&quot;
  
  #import &lt;React/RCTBridge.h&gt;
  #import &lt;React/RCTBundleURLProvider.h&gt;
  #import &lt;React/RCTRootView.h&gt;
  #import &lt;UserNotifications/UserNotifications.h&gt;
  #import &lt;RNCPushNotificationIOS.h&gt;
  #import &lt;GoogleMaps/GoogleMaps.h&gt;
  #import &quot;RNSplashScreen.h&quot;
  
  @implementation AppDelegate
  
  - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  {
    if ([FIRApp defaultApp] == nil) {
      [FIRApp configure];
    }
  
     [GMSServices provideAPIKey:@&quot;AIzaSyBALbK0zTosrX4J1sl9-k1wJt14Zuwk37M&quot;];
  
    RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
    RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
                                                     moduleName:@&quot;APPBusinessPlaza63&quot;
                                              initialProperties:nil];
  
    rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
  
    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
    UIViewController *rootViewController = [UIViewController new];
    rootViewController.view = rootView;
    self.window.rootViewController = rootViewController;
    [self.window makeKeyAndVisible];
    
    // Define UNUserNotificationCenter
     UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
     center.delegate = self;
    [RNSplashScreen show];
    return YES;
  }
  
  - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
  {
  #if DEBUG
    return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@&quot;index&quot; fallbackResource:nil];
  #else
    return [[NSBundle mainBundle] URLForResource:@&quot;main&quot; withExtension:@&quot;jsbundle&quot;];
  #endif
  }
  
  // Required to register for notifications
  - (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings
  {
   [RNCPushNotificationIOS didRegisterUserNotificationSettings:notificationSettings];
  }
  // Required for the register event.
  - (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
  {
   [RNCPushNotificationIOS didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
  }
  // Required for the notification event. You must call the completion handler after handling the remote notification.
  - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
  fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
  {
    [RNCPushNotificationIOS didReceiveRemoteNotification:userInfo fetchCompletionHandler:completionHandler];
  }
  // Required for the registrationError event.
  - (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
  {
   [RNCPushNotificationIOS didFailToRegisterForRemoteNotificationsWithError:error];
  }
  // IOS 10+ Required for localNotification event
  - (void)userNotificationCenter:(UNUserNotificationCenter *)center
  didReceiveNotificationResponse:(UNNotificationResponse *)response
           withCompletionHandler:(void (^)(void))completionHandler
  {
    [RNCPushNotificationIOS didReceiveNotificationResponse:response];
    completionHandler();
  }
  // IOS 4-10 Required for the localNotification event.
  - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
  {
   [RNCPushNotificationIOS didReceiveLocalNotification:notification];
  }
  
  //Called when a notification is delivered to a foreground app.
  -(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler
  {
    completionHandler(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge);
  }
  
  @end
  </code></pre>
  <pre><code>Info.plist file
  </code></pre>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
  &lt;plist version=&quot;1.0&quot;&gt;
  &lt;dict&gt;
      &lt;key&gt;CFBundleDevelopmentRegion&lt;/key&gt;
      &lt;string&gt;en&lt;/string&gt;
      &lt;key&gt;CFBundleDisplayName&lt;/key&gt;
      &lt;string&gt;$(PRODUCT_NAME)&lt;/string&gt;
      &lt;key&gt;CFBundleExecutable&lt;/key&gt;
      &lt;string&gt;$(EXECUTABLE_NAME)&lt;/string&gt;
      &lt;key&gt;CFBundleIdentifier&lt;/key&gt;
      &lt;string&gt;$(PRODUCT_BUNDLE_IDENTIFIER)&lt;/string&gt;
      &lt;key&gt;CFBundleInfoDictionaryVersion&lt;/key&gt;
      &lt;string&gt;6.0&lt;/string&gt;
      &lt;key&gt;CFBundleName&lt;/key&gt;
      &lt;string&gt;$(PRODUCT_NAME)&lt;/string&gt;
      &lt;key&gt;CFBundlePackageType&lt;/key&gt;
      &lt;string&gt;APPL&lt;/string&gt;
      &lt;key&gt;CFBundleShortVersionString&lt;/key&gt;
      &lt;string&gt;1.0&lt;/string&gt;
      &lt;key&gt;CFBundleSignature&lt;/key&gt;
      &lt;string&gt;????&lt;/string&gt;
      &lt;key&gt;CFBundleURLTypes&lt;/key&gt;
      &lt;array&gt;
          &lt;dict&gt;
              &lt;key&gt;CFBundleTypeRole&lt;/key&gt;
              &lt;string&gt;Editor&lt;/string&gt;
              &lt;key&gt;CFBundleURLName&lt;/key&gt;
              &lt;string&gt;Bundle ID&lt;/string&gt;
              &lt;key&gt;CFBundleURLSchemes&lt;/key&gt;
              &lt;array&gt;
                  &lt;string&gt;com.webmascot.bp&lt;/string&gt;
              &lt;/array&gt;
          &lt;/dict&gt;
          &lt;dict&gt;
              &lt;key&gt;CFBundleTypeRole&lt;/key&gt;
              &lt;string&gt;Editor&lt;/string&gt;
              &lt;key&gt;CFBundleURLSchemes&lt;/key&gt;
              &lt;array&gt;
                  &lt;string&gt;com.googleusercontent.apps.558394662083-po8okplh2v0cvc91r76rkau73tddkpj7&lt;/string&gt;
              &lt;/array&gt;
          &lt;/dict&gt;
          &lt;dict&gt;
              &lt;key&gt;CFBundleTypeRole&lt;/key&gt;
              &lt;string&gt;Editor&lt;/string&gt;
              &lt;key&gt;CFBundleURLSchemes&lt;/key&gt;
              &lt;array&gt;
                  &lt;string&gt;fb469065720287765&lt;/string&gt;
              &lt;/array&gt;
          &lt;/dict&gt;
      &lt;/array&gt;
      &lt;key&gt;CFBundleVersion&lt;/key&gt;
      &lt;string&gt;1&lt;/string&gt;
      &lt;key&gt;LSRequiresIPhoneOS&lt;/key&gt;
      &lt;true/&gt;
      &lt;key&gt;NSAppTransportSecurity&lt;/key&gt;
      &lt;dict&gt;
          &lt;key&gt;NSAllowsArbitraryLoads&lt;/key&gt;
          &lt;true/&gt;
          &lt;key&gt;NSExceptionDomains&lt;/key&gt;
          &lt;dict&gt;
              &lt;key&gt;localhost&lt;/key&gt;
              &lt;dict&gt;
                  &lt;key&gt;NSExceptionAllowsInsecureHTTPLoads&lt;/key&gt;
                  &lt;true/&gt;
              &lt;/dict&gt;
          &lt;/dict&gt;
      &lt;/dict&gt;
      &lt;key&gt;NSLocationWhenInUseUsageDescription&lt;/key&gt;
      &lt;string&gt;&lt;/string&gt;
      &lt;key&gt;UIAppFonts&lt;/key&gt;
      &lt;array&gt;
          &lt;string&gt;Axiforma_Bold.ttf&lt;/string&gt;
          &lt;string&gt;Axiforma_Book.ttf&lt;/string&gt;
          &lt;string&gt;Axiforma_Light.ttf&lt;/string&gt;
          &lt;string&gt;Axiforma_Medium.ttf&lt;/string&gt;
          &lt;string&gt;Axiforma_Regular.ttf&lt;/string&gt;
          &lt;string&gt;MaterialIcons.ttf&lt;/string&gt;
          &lt;string&gt;MaterialCommunityIcons.ttf&lt;/string&gt;
          &lt;string&gt;Poppins-Black.ttf&lt;/string&gt;
          &lt;string&gt;Poppins-BlackItalic.ttf&lt;/string&gt;
          &lt;string&gt;Poppins-Bold.ttf&lt;/string&gt;
          &lt;string&gt;Poppins-BoldItalic.ttf&lt;/string&gt;
          &lt;string&gt;Poppins-ExtraBold.ttf&lt;/string&gt;
          &lt;string&gt;Poppins-ExtraBoldItalic.ttf&lt;/string&gt;
          &lt;string&gt;Poppins-ExtraLight.ttf&lt;/string&gt;
          &lt;string&gt;Poppins-ExtraLightItalic.ttf&lt;/string&gt;
          &lt;string&gt;Poppins-Italic.ttf&lt;/string&gt;
          &lt;string&gt;Poppins-Light.ttf&lt;/string&gt;
          &lt;string&gt;Poppins-LightItalic.ttf&lt;/string&gt;
          &lt;string&gt;Poppins-Medium.ttf&lt;/string&gt;
          &lt;string&gt;Poppins-MediumItalic.ttf&lt;/string&gt;
          &lt;string&gt;Poppins-Regular.ttf&lt;/string&gt;
          &lt;string&gt;Poppins-SemiBold.ttf&lt;/string&gt;
          &lt;string&gt;Poppins-SemiBoldItalic.ttf&lt;/string&gt;
          &lt;string&gt;Poppins-Thin.ttf&lt;/string&gt;
          &lt;string&gt;Poppins-ThinItalic.ttf&lt;/string&gt;
          &lt;string&gt;Roboto-Black.ttf&lt;/string&gt;
          &lt;string&gt;Roboto-BlackItalic.ttf&lt;/string&gt;
          &lt;string&gt;Roboto-Bold.ttf&lt;/string&gt;
          &lt;string&gt;Roboto-BoldItalic.ttf&lt;/string&gt;
          &lt;string&gt;Roboto-Italic.ttf&lt;/string&gt;
          &lt;string&gt;Roboto-Light.ttf&lt;/string&gt;
          &lt;string&gt;Roboto-Medium.ttf&lt;/string&gt;
          &lt;string&gt;Roboto-Regular.ttf&lt;/string&gt;
          &lt;string&gt;Roboto-Thin.ttf&lt;/string&gt;
          &lt;string&gt;Roboto_medium.ttf&lt;/string&gt;
          &lt;string&gt;Roboto.ttf&lt;/string&gt;
          &lt;string&gt;rubicon-icon-font.ttf&lt;/string&gt;
      &lt;/array&gt;
      &lt;key&gt;UIBackgroundModes&lt;/key&gt;
      &lt;array&gt;
          &lt;string&gt;fetch&lt;/string&gt;
          &lt;string&gt;remote-notification&lt;/string&gt;
      &lt;/array&gt;
      &lt;key&gt;UILaunchStoryboardName&lt;/key&gt;
      &lt;string&gt;LaunchScreen&lt;/string&gt;
      &lt;key&gt;UIRequiredDeviceCapabilities&lt;/key&gt;
      &lt;array&gt;
          &lt;string&gt;armv7&lt;/string&gt;
      &lt;/array&gt;
      &lt;key&gt;UISupportedInterfaceOrientations&lt;/key&gt;
      &lt;array&gt;
          &lt;string&gt;UIInterfaceOrientationPortrait&lt;/string&gt;
          &lt;string&gt;UIInterfaceOrientationLandscapeLeft&lt;/string&gt;
          &lt;string&gt;UIInterfaceOrientationLandscapeRight&lt;/string&gt;
      &lt;/array&gt;
      &lt;key&gt;UIViewControllerBasedStatusBarAppearance&lt;/key&gt;
      &lt;false/&gt;
  &lt;/dict&gt;
  &lt;/plist&gt;
  </code></pre>