Ошибка: не удалось вызвать метод модуля JavaScript rcteventemitre.receiveevent (). Модуль не был зарегистрирован как вызIOS

Программируем под IOS
Ответить
Anonymous
 Ошибка: не удалось вызвать метод модуля JavaScript rcteventemitre.receiveevent (). Модуль не был зарегистрирован как выз

Сообщение Anonymous »

my app.tsx: < /p>
import {useEffect, useState}from 'react';
import * as React from 'react';
import { View, StyleSheet} from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import AsyncStorage from '@react-native-async-storage/async-storage';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import LoginScreen from './src/pages/LoginScreen';
import OtpScreen from './src/pages/OtpScreen';
import CreateAccount from './src/pages/CreateAccount';
import Dashboard from './src/pages/Dashboard';
import OneTime from './src/pages/OneTime';
import Monthly from './src/pages/Monthly';
import Schedule from './src/pages/Schedule';
import Listing from './src/pages/Listing';
import RoleScreen from './src/pages/Role';
import BookingPage from './src/pages/BookingPage';
import Onboard from './src/pages/helper/Onboard';
import Maid from './src/pages/helper/maid';
import Driver from './src/pages/helper/Driver';
import Electrician from './src/pages/helper/Electrician';
import Makeup from './src/pages/helper/Makeup';
import Language from './src/pages/helper/Language';
import JobPosting from './src/pages/JobPosting';
import Bidding from './src/pages/Bidding';
import HelperProfile from './src/pages/HelperProfile';
import Bookings from './src/pages/Bookings';
import ProfileMenu from './src/pages/ProfileMenu';
import HelperDashboard from './src/pages/helper/HelperDashboard';
import Jobs from './src/pages/helper/Jobs';
import Posts from './src/pages/helper/Posts';
import ProfileHelper from './src/pages/helper/ProfileHelper';
import SplashScreen from 'react-native-splash-screen';
import LocationUpdate from './src/pages/LocationUpdate';
import Current from './src/pages/Current';
import EditProfile from './src/pages/EditProfile';
import FilterModal from './src/pages/FilterModal';
import Ongoing from './src/pages/Ongoing';
import ScheduledB from './src/pages/ScheduledB';
import Active from './src/pages/helper/Active';
import Working from './src/pages/helper/Working';
import { useNavigation } from '@react-navigation/native';
import EditHelper from './src/pages/helper/EditHelper';
import AboutUs from './src/pages/AboutUs';
import i18n from './src/i18n';
import Wallet from './src/pages/helper/Wallet';

// Define Navigation Stack
const Stack = createNativeStackNavigator();

function App() {
const [initialRoute, setInitialRoute] = useState(null);
useEffect(() => {
const checkLogin = async () => {
try {
const userData = await AsyncStorage.getItem('userData');
const helperData = await AsyncStorage.getItem('helperData');

if (helperData) {
const helper = JSON.parse(helperData);
i18n.changeLanguage(helper.language);
setInitialRoute('HelperDashboard');
} else if (userData) {
setInitialRoute('Dashboard');
} else {
setInitialRoute('Login');
}
} catch (e) {
setInitialRoute('Login');
} finally {
SplashScreen.hide();
}
};

checkLogin();
}, []);
return (




{/* Auth Screens */}






{/* Helper Onboarding Flow */}
















{/* Main App Screens */}




















);
}

// Styles (you can remove the video styles if not needed elsewhere)
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#3b5998',
},
});

export default App;

< /code>
my index.js: < /p>
/**
* @format
*/
import 'react-native-get-random-values';
import { AppRegistry} from 'react-native';
import App from './App';
import { name as appName } from './app.json';

AppRegistry.registerComponent(appName, () => App);
< /code>
npx реагировать-присутствующая информация: < /p>
Информация о системе и библиотеках. /bin/zsh
Binaries:
Node:
version: 23.7.0
path: /opt/homebrew/bin/node
Yarn: Not Found
npm:
version: 10.9.2
path: /opt/homebrew/bin/npm
Watchman:
version: 2025.03.10.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods: Not Found
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.5
- iOS 18.5
- macOS 15.5
- tvOS 18.5
- Visionos 2.5
- WatchOS 11,5
Android SDK: не найдено
ides:
android Studio: не найдено
xcode:
версия: 16.4 /16f6
path: /usr /bin /xcodebuild
pather:
java:
xcodebuild

java:
xcodebuild

java:
xcodebuild

java:
xcodebuild

java: 17.0. /opt /homebrew /opt /openjdk@17 /bin /javac
ruby:
версия: 2.6.10
path: /usr /bin /ruby
npmpackages:
"@React-antive-community /cli":
stecked: 18.0. /> Установлено: 19.0.0
Wanted: 19.0.0
React-Native:
Установлено: 0,79,1
Wanted: 0.79.1
React-cantive-macos: не найдено
npmglobalpackages:
eRe-native < /em> ": не найдено
и
и
и
и
и
arderes:
and oid. true
newarchenabled: true
ios:
hermesenabled: false
newarchenabled: true < /p>
podfile: < /p>
require_relative '../node_modules/react-native/scripts/react_native_pods'

# Enable New Architecture
ENV['RCT_NEW_ARCH_ENABLED'] = '1'
ENV['USE_FABRIC'] = '1'

platform :ios, '16.0'
inhibit_all_warnings!

# Use static frameworks (required for Fabric)
use_frameworks! :linkage => :static

# Prepare React Native project
prepare_react_native_project!

target 'helpex' do
config = use_native_modules!

# New Architecture flags
flags = {
:hermes_enabled => false,
:fabric_enabled => true,
:new_arch_enabled => true
}

use_react_native!(
:path => config[:reactNativePath],
**flags
)

pod 'ReactAppDependencyProvider', :path => 'build/generated/ios'
pod 'ReactCodegen', :path => 'build/generated/ios'

# Firebase
pod 'FirebaseCore'
pod 'FirebaseDatabase'
pod 'FirebaseMessaging'

target 'helpexTests' do
inherit! :complete
end

post_install do |installer|
# Standard React Native post-install FIRST
react_native_post_install(installer, config[:reactNativePath], mac_catalyst_enabled: false)

# Deployment target and custom build settings
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0'

# Fix for Yoga
if target.name == 'Yoga' || target.name.end_with?('Yoga')
config.build_settings['DEFINES_MODULE'] = 'NO'
end

# Fix for FirebaseCore (Swift Bridging Header)
if target.name == 'FirebaseCore'
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS']
package.json:
{
"name": "helpex",
"version": "0.0.1",
"private": true,
"codegenConfig": {
"name": "helpex",
"type": "all",
"jsSrcsDir": "src",
"includes": [
"node_modules/react-native/Libraries/**/*.js",
"node_modules/react-native/Libraries/EventEmitter/*.js"
],
"ios": {
"appDelegateHeaderFile": "ios/helpex/AppDelegate.h",
"appDelegateImplementationFile": "ios/helpex/AppDelegate.mm",
"entryPointHeaderFile": "ios/helpex/AppDelegate.h",
"entryPointImplementationFile": "ios/helpex/AppDelegate.mm"
}
},
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint .",
"start": "react-native start",
"test": "jest",
"build:ios": "cd ios && /opt/homebrew/bin/pod install"
},
"dependencies": {
"@notifee/react-native": "^9.1.8",
"@react-native-async-storage/async-storage": "^2.1.2",
"@react-native-community/slider": "^4.5.6",
"@react-native-firebase/app": "^22.4.0",
"@react-native-firebase/database": "^22.1.0",
"@react-native-firebase/messaging": "^22.0.0",
"@react-native-masked-view/masked-view": "^0.3.2",
"@react-navigation/native": "^7.1.9",
"@react-navigation/native-stack": "^7.3.10",
"axios": "^1.10.0",
"expo-linear-gradient": "^14.1.4",
"i18next": "^25.2.1",
"install": "^0.13.0",
"lottie-react-native": "^7.2.2",
"pod": "^0.9.0",
"react": "19.0.0",
"react-i18next": "^15.5.2",
"react-native": "0.79.1",
"react-native-blob-util": "^0.22.2",
"react-native-fast-image": "^8.6.3",
"react-native-geolocation-service": "^5.3.1",
"react-native-gesture-handler": "^2.25.0",
"react-native-get-random-values": "^1.11.0",
"react-native-google-places-autocomplete": "^2.5.7",
"react-native-image-picker": "^8.2.1",
"react-native-linear-gradient": "^2.8.3",
"react-native-loading-dots": "^1.3.5",
"react-native-localize": "^3.4.1",
"react-native-map-clustering": "^3.4.2",
"react-native-maps": "^1.22.6",
"react-native-razorpay": "^2.3.0",
"react-native-responsive-screen": "^1.4.2",
"react-native-safe-area-context": "^5.4.1",
"react-native-screens": "^4.10.0",
"react-native-share": "^12.1.0",
"react-native-splash-screen": "^3.3.0",
"react-native-svg": "^15.12.0",
"react-native-video": "^6.13.0",
"socket.io-client": "^4.8.1"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@react-native-community/cli": "18.0.0",
"@react-native-community/cli-platform-android": "18.0.0",
"@react-native-community/cli-platform-ios": "^18.0.0",
"@react-native/babel-preset": "0.79.1",
"@react-native/eslint-config": "0.79.1",
"@react-native/metro-config": "0.79.1",
"@react-native/typescript-config": "0.79.1",
"@types/jest": "^29.5.13",
"@types/react": "^19.0.0",
"@types/react-test-renderer": "^19.0.0",
"eslint": "^8.19.0",
"jest": "^29.6.3",
"prettier": "2.8.8",
"react-native-codegen": "^0.70.7",
"react-test-renderer": "19.0.0",
"typescript": "5.0.4"
},
"engines": {
"node": ">=18"
}
}


Подробнее здесь: https://stackoverflow.com/questions/797 ... ceiveevent
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «IOS»