Исключение, возникающее при выполнении блока пользовательского интерфейса:
Код: Выделить всё
-[RCTView setSheetLargestUndimmedDetent:]: unrecognized selector sent to instance 0xXXXXXXXXXXMRE:
Код: Выделить всё
// App.tsx
import React from 'react';
import { Modal, View, Button, StyleSheet, Text } from 'react-native';
export default function App() {
const [modalVisible, setModalVisible] = React.useState(false);
return (
setModalVisible(true)} />
{
setModalVisible(false);
}}
>
This is a core React Native Modal.
setModalVisible(false)} />
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
padding: 20,
},
modalOverlay: {
flex: 1,
backgroundColor: 'rgba(0,0,0,0.5)',
justifyContent: 'center',
alignItems: 'center',
},
modalContent: {
backgroundColor: 'white',
padding: 20,
borderRadius: 10,
alignItems: 'center',
},
});
Код: Выделить всё
React: 19.0.0
React Native: 0.79.0
react-native-screens: 4.10.0
react-native-safe-area-context: 5.4.0
react-native-gesture-handler: 2.18.1 (or your specific version)
Xcode: 15.4
iOS Deployment Target: 16.0
CocoaPods: 1.16.2
macOS: 13.6
Мой проект настроен для новой архитектуры (Fabric). Вот соответствующая часть моего подфайла:
Код: Выделить всё
# platform :ios, '16.0'
# prepare_react_native_project!
# $RNFirebaseAsStaticFramework = true # If using Firebase with static linkage
# use_frameworks! :linkage => :static # If using static frameworks
target 'Bond' do # Replace 'Bond' with your app's target name
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
:hermes_enabled => false, # Consider enabling Hermes with Fabric
:fabric_enabled => true,
:new_arch_enabled => true,
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
# Example Firebase pod with modular_headers (if you use Firebase)
# pod 'FirebaseCore', :modular_headers => true
# pod 'FirebaseMessaging', :modular_headers => true
pod 'RNScreens', :podspec => '../node_modules/react-native-screens/RNScreens.podspec'
# ... (rest of your target, e.g., BondTests)
post_install do |installer|
react_native_post_install(installer, config[:reactNativePath], :mac_catalyst_enabled => false)
installer.pods_project.targets.each do |target_pod|
target_pod.build_configurations.each do |build_config|
build_config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++20'
build_config.build_settings['CLANG_CXX_LIBRARY'] = 'libc++'
defs = Array(build_config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'])
defs
Подробнее здесь: [url]https://stackoverflow.com/questions/79632518/react-native-ios-crash-setsheetlargestundimmeddetent-on-rctview-with-core-mod[/url]
Мобильная версия