мое приложение.tsx:
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;
мой index.js:
/**
* @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);
npx response-native info:
info Получение информации о системе и библиотеках...
Система:
ОС: macOS 15.5
ЦП: (8) Arm64 Apple M2
Память: 136,81 МБ / 16,00 ГБ
Оболочка:
версия: «5.9»
путь: /bin/zsh
Двоичные файлы:
узел:
версия: 23.7.0
путь: /opt/homebrew/bin/node
Yarn: не найден
npm:
версия: 10.9.2
путь: /opt/homebrew/bin/npm
Watchman:
версия: 2025.03.10.00
Путь: /opt/homebrew/bin/watchman
Диспетчеры:
CocoaPods: не найдены
SDK:
iOS SDK:
Платформы:
- DriverKit 24.5
- iOS 18.5
- macOS 15.5
- tvOS 18.5
- VisionOS 2.5
- watchOS 11.5
Android SDK: не найден
IDE:
Android Studio: не найден
Xcode:
версия: 16.4/16F6
Путь: /usr/bin/xcodebuild
Языки:
Java:
версия: 17.0.14
путь: /opt/homebrew/opt/openjdk@17/bin/javac
Ruby:
версия: 2.6.10
путь: /usr/bin/ruby
npmPackages:
"@react-native-community/cli":
установлено: 18.0.0
требуется: 18.0.0
react:
установлен: 19.0.0
требуется: 19.0.0
react-native:
установлен: 0.79.1
требуется: 0.79.1
react-native-macos: не найден
npmGlobalPackages:
"react-native": не найден
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: false
newArchEnabled: true
podfile:
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']
Подробнее здесь: https://stackoverflow.com/questions/797 ... ceiveevent
Ошибка: не удалось вызвать метод модуля JavaScript RCTEventEmitter.receiveEvent(). Модуль не зарегистрирован как вызывае ⇐ IOS
Программируем под IOS
1767631585
Anonymous
мое приложение.tsx:
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;
мой index.js:
/**
* @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);
npx response-native info:
info Получение информации о системе и библиотеках...
Система:
ОС: macOS 15.5
ЦП: (8) Arm64 Apple M2
Память: 136,81 МБ / 16,00 ГБ
Оболочка:
версия: «5.9»
путь: /bin/zsh
Двоичные файлы:
узел:
версия: 23.7.0
путь: /opt/homebrew/bin/node
Yarn: не найден
npm:
версия: 10.9.2
путь: /opt/homebrew/bin/npm
Watchman:
версия: 2025.03.10.00
Путь: /opt/homebrew/bin/watchman
Диспетчеры:
CocoaPods: не найдены
SDK:
iOS SDK:
Платформы:
- DriverKit 24.5
- iOS 18.5
- macOS 15.5
- tvOS 18.5
- VisionOS 2.5
- watchOS 11.5
Android SDK: не найден
IDE:
Android Studio: не найден
Xcode:
версия: 16.4/16F6
Путь: /usr/bin/xcodebuild
Языки:
Java:
версия: 17.0.14
путь: /opt/homebrew/opt/openjdk@17/bin/javac
Ruby:
версия: 2.6.10
путь: /usr/bin/ruby
npmPackages:
"@react-native-community/cli":
установлено: 18.0.0
требуется: 18.0.0
react:
установлен: 19.0.0
требуется: 19.0.0
react-native:
установлен: 0.79.1
требуется: 0.79.1
react-native-macos: не найден
npmGlobalPackages:
"react-native": не найден
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: false
newArchEnabled: true
podfile:
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']
Подробнее здесь: [url]https://stackoverflow.com/questions/79703760/error-failed-to-call-into-javascript-module-method-rcteventemitter-receiveevent[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия