react-native-screens: Exception thrown while executing UI block: -[RCTView setSheetLargestUndimmedDetent:]

Description

I have upgraded from RN 0.73 → RN 0.79 :

I got error

Whether I haven’t any version difference find

Exception thrown while executing UI block: -[RCTView setSheetLargestUndimmedDetent:]: unrecognized selector sent to instance 0x11330eab0

__44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke
RCTUIManager.mm:1169
__44-[RCTUIManager flushUIBlocksWithCompletion:]_block_invoke.195
__RCTExecuteOnMainQueue_block_invoke
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_main_queue_drain
_dispatch_main_queue_callback_4CF
CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE
__CFRunLoopRun
CFRunLoopRunSpecific
GSEventRunModal
-[UIApplication _run]
UIApplicationMain
__debug_main_executable_dylib_entry_point
start_sim
0x0

Anyone know how to solve thsi issue I have tried all

Steps to reproduce

AppDelegate.swift

import UIKit
import UserNotifications
import Firebase
import RNBranch
import RNCPushNotificationIOS
import CodePush
import React

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate {

  var window: UIWindow?
  var bridge: RCTBridge?

  func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {

    FirebaseApp.configure()
    RNBranch.initSession(withLaunchOptions: launchOptions, isReferrable: true)

    UNUserNotificationCenter.current().delegate = self

    let bridge = RCTBridge(delegate: self, launchOptions: launchOptions)
    self.bridge = bridge

    let rootView = RCTRootView(bridge: bridge!, moduleName: "Wiingy", initialProperties: nil)

    let rootViewController = UIViewController()
    rootViewController.view = rootView

    window = UIWindow(frame: UIScreen.main.bounds)
    window?.rootViewController = rootViewController
    window?.makeKeyAndVisible()

    return true
  }

  func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
    RNCPushNotificationIOS.didRegisterForRemoteNotifications(withDeviceToken: deviceToken)
  }

  func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) {
    RNCPushNotificationIOS.didFailToRegisterForRemoteNotificationsWithError(error)
  }

  func application(
    _ application: UIApplication,
    didReceiveRemoteNotification userInfo: [AnyHashable: Any],
    fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void
  ) {
    RNCPushNotificationIOS.didReceiveRemoteNotification(userInfo, fetchCompletionHandler: completionHandler)
  }

  func userNotificationCenter(
    _ center: UNUserNotificationCenter,
    willPresent notification: UNNotification,
    withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void
  ) {
    completionHandler([.badge, .sound, .alert])
  }

  func userNotificationCenter(
    _ center: UNUserNotificationCenter,
    didReceive response: UNNotificationResponse,
    withCompletionHandler completionHandler: @escaping () -> Void
  ) {
    RNCPushNotificationIOS.didReceive(response)
  }

  func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
    return RNBranch.application(app, open: url, options: options)
  }

  func application(_ application: UIApplication,
                   continue userActivity: NSUserActivity,
                   restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
    return RNBranch.continue(userActivity)
  }
}

extension AppDelegate: RCTBridgeDelegate {
  func sourceURL(for bridge: RCTBridge!) -> URL! {
#if DEBUG
    return RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index", fallbackResource: nil)
#else
    return CodePush.bundleURL()
#endif
  }
}

Snack or a link to a repository

https://stackoverflow.com/questions/79482400/react-native-0-78-0-ios-build-typeerror-nativernlocalize-default-getlocales-is

Screens version

4.10.0

React Native version

0.79.0

Platforms

iOS

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Fabric (New Architecture)

Build type

Debug mode

Device

Real device

Device model

Iphone 13

Acknowledgements

Yes

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (6 by maintainers)

Most upvoted comments

Hey @shubhanshubb I won’t look into it, since the error seems to be unrelated to react-native-screens and most likely comes from the upgrade process.

I’ll be happy to help in case you experience any more issues with react-native-screens.

Hey! 👋

The issue doesn’t seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?