I'm developing a brand new iOS/Android app and I want to use a single code, so I decided to use ReactNative for my pourpouses, and I want to build myself the executable instead of using something like Expo for remote building, so I bought a MacMini where I connected my Android and iOS physical devices (where i'll run my project).
I'm using VisualStudioCode as IDE and did all the passages to install ReactNative (v0.73.5) and everything goes well, I have my base project that runs perfectly using
npm start
and running both version on my devices without problems.
The problem came when I try to add navigation-container in my project; I followed the guide (
https://reactnavigation.org/docs/getting-started/) and installed native stack navigator library too (
https://reactnavigation.org/docs/hello-react-navigation) and write a simple code to automatically switch from project start (App.tsx) to a splash page, like this:
import * as React from 'react'; import { NavigationContainer } from '@react-navigation/native'; import { createNativeStackNavigator } from '@react-navigation/native-stack'; import SplashScreen from './screens/SplashScreen'; const Stack = createNativeStackNavigator(); function App() { return ( ); } export default App; and run it using
npx react-native run-ios and
npx react-native run-android.
On Android everything works well, and I land in my splash screen as I intended, but on iOS I can't even build and run anything: using npx i got this error
** BUILD FAILED ** The following build commands failed: Ld /Users/******/Library/Developer/Xcode/DerivedData/ETMHOMECROSS-avqdpcaltzlgykcghamktxvqeiyk/Build/Products/Debug-iphoneos/RNScreens/RNScreens.framework/RNScreens normal (in target 'RNScreens' from project 'Pods') (1 failure) while using
npm start and typing
i the build stuck with no error while compiling
info Opening app on iOS... info A dev server is already running for this project on port 8081. info Found Xcode workspace "ETMHOMECROSS.xcworkspace" info Found booted iPhone 14 Development , iPad info Building (using "xcodebuild -workspace ETMHOMECROSS.xcworkspace -configuration Debug -scheme ETMHOMECROSS -destination id=00008110-000255322130A01E") info

Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit:
https://github.com/react-native-communi ... .md#doctor Command line invocation: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace ETMHOMECROSS.xcworkspace -configuration Debug -scheme ETMHOMECROSS -destination id=00008110-000255322130A01E User defaults from command line: IDEPackageSupportUseBuiltinSCM = YES Prepare packages ComputeTargetDependencyGraph note: Building targets in dependency order note: T a r g e t d e p e n d e n c y g r a p h ( 6 1 t a r g e t s ) T a r g e t ' E T M H O M E C R O S S ' i n p r o j e c t ' E T M H O M E C R O S S ' ➜ I m p l i c i t d e p e n d e n c y o n t a r g e t ' P o d s - E T M H O M E C R O S S ' i n p r o j e c t ' P o d s ' v i a f i l e ' P o d s _ E T M H O M E C R O S S . f r a m e w o r k ' i n b u i l d p h a s e ' L i n k B i n a r y ' ➜ I m p l i c i t d e p e n d e n c y o n t a r g e t ' C o c o a A s y n c S o c k e t ' i n p r o j e c t ' P o d s ' v i a o p t i o n s ' - f r a m e w o r k C o c o a A s y n c S o c k e t ' i n b u i l d s e t t i n g ' O T H E R _ L D F L A G S ' ➜ I m p l i c i t d e p e n d e n c y o n t a r g e t ' R e a c t - C o r e M o d u l e s ' i n p r o j e c t ' P o d s ' v i a o p t i o n s ' - f r a m e w o r k C o r e M o d u l e s ' i n b u i l d s e t t i n g ' O T H E R _ L D F L A G S ' ➜ I m p l i c i t d e p e n d e n c y o n t a r g e t ' D o u b l e C o n v e r s i o n ' i n p r o j e c t ' P o d s ' v i a o p t i o n s ' - f r a m e w o r k D o u b l e C o n v e r s i o n ' i n b u i l d s e t t i n g ' O T H E R _ L D F L A G S ' ➜ I m p l i c i t d e p e n d e n c y o n t a r g e t ' R e a c t - R C T A n i m a t i o n ' i n p r o j e c t ' P o d s ' v i a o p t i o n s ' - f r a m e w o r k R C T A n i m a t i o n ' i n b u i l d s e t t i n g ' O T H E R _ L D F L A G S ' ➜ I m p l i c i t d e p e n d e n c y o n t a r g e t ' R e a c t - R C T B l o b ' i n p r o j e c t ' P o d s ' v i a o p t i o n s ' - f r a m e w o r k R C T B l o b ' i n b u i l d s e t t i n g ' O T H E R _ L D F L A G S ' ➜ I m p l i c i t d e p e n d e n c y o n t a r g e t ' R e a c t - R C T F a b r i c ' i n p r o j e c t ' P o d s ' v i a o p t i o n s ' - f r a m e w o r k R C T F a b r i c ' i n b u i l d s e t t i n g ' O T H E R _ L D F L A G S ' ➜ I m p l i c i t d e p e n d e n c y o n t a r g e t ' R e a c t - R C T I m a g e ' i n p r o j e c t ' P o d s ' v i a o p t i o n s ' - f r a m e w o r k R C T I m a g e ' i n b u i l d s e t t i n g ' O T H E R _ L D F L A G S ' ➜ I m p l i c i t d e p e n d e n c y o n t a r g e t ' R e a c t - R C T L i n k i n g ' i n p r o j e c t ' P o d s ' v i a o p t i o n s ' - f r a m e w o r k R C T L i n k i n g ' i n b u i l d s e t t i n g ' O T H E R _ L D F L A G S ' ➜ I m p l i c i t d e p e n d e n c y o n t a r g e t ' R e a c t - R C T N e t w o r k ' i n p r o j e c t ' P o d s ' v i a o p t i o n s ' - f r a m e w o r k R C T N e t w o r k ' i n b u i l d s e t t i n g ' O T H E R _ L D F L A G S ' ➜ I m p l i c i t d e p e n d e n c y o n t a r g e t ' R e a c t - R C T S e t t i n g s ' i n p r o j e c t ' P o d s ' v i a o p t i o n s ' - f r a m e w o r k R C T S e t t i n g s ' i n b u i l d s e t t i n g ' O T H E R _ L D F L A G S ' ➜ I m p l i c i t d e p e n d e n c y o n t a r g e t ' R e a c t - R C T T e x t ' i n p r o j e c t ' P o d s ' v i a o p t i o n s ' - f r a m e w o r k R C T T e x t ' i n b u i l d s e t t i n g ' O T H E R _ L D F L A G S ' ➜ I m p l i c i t d e p e n d e n c y o n t a r g e t ' R C T T y p e S a f e t y ' i n p r o j e c t ' P o d s ' v i a o p t i o n s ' - f r a m e w o r k R C T T y p e S a f e t y ' i n b u i l d s e t t i n g ' O T H E R _ L D F L A G S ' ➜ I m p l i c i t d e p e n d e n c y o n t a r g e t ' R e a c t - R C T V i b r a t i o n ' i n p r o j e c t ' P o d s ' v i a o p t i o n s ' - f r a m e w o r k R C T V i b r a t i o n ' i n b u i l d s e t t i n g ' O T H E R _ L D F L A G S ' ➜ I m p l i c i t d e p e n d e n c y o n t a r g e t ' R N C M a s k e d V i e w ' i n p r o j e c t ' P o d s ' v i a o p t i o n s ' - f r a m e w o r k R N C M a s k e d V i e w ' i n b u i l d s e t t i n g ' O T H E R _ L D F L A G S ' ➜ Implicit dependency on target 'RNGestureHandler' in project 'Pods' via options '-framework RNGestureHandler' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'RNReanimated' in project 'Pods' via options '-framework RNReanimated' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'RNScreens' in project 'Pods' via options '-framework RNScreens' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-Core' in project 'Pods' via options '-framework React' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'ReactCommon' in project 'Pods' via options '-framework ReactCommon' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-Codegen' in project 'Pods' via options '-framework React_Codegen' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-Fabric' in project 'Pods' via options '-framework React_Fabric' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-FabricImage' in project 'Pods' via options '-framework React_FabricImage' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-ImageManager' in project 'Pods' via options '-framework React_ImageManager' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-Mapbuffer' in project 'Pods' via options '-framework React_Mapbuffer' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-NativeModulesApple' in project 'Pods' via options '-framework React_NativeModulesApple' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-RCTAppDelegate' in project 'Pods' via options '-framework React_RCTAppDelegate' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-debug' in project 'Pods' via options '-framework React_debug' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-graphics' in project 'Pods' via options '-framework React_graphics' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-jserrorhandler' in project 'Pods' via options '-framework React_jserrorhandler' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-nativeconfig' in project 'Pods' via options '-framework React_nativeconfig' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-rendererdebug' in project 'Pods' via options '-framework React_rendererdebug' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-runtimescheduler' in project 'Pods' via options '-framework React_runtimescheduler' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-utils' in project 'Pods' via options '-framework React_utils' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'SocketRocket' in project 'Pods' via options '-framework SocketRocket' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-cxxreact' in project 'Pods' via options '-framework cxxreact' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'fmt' in project 'Pods' via options '-framework fmt' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'RCT-Folly' in project 'Pods' via options '-framework folly' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'glog' in project 'Pods' via options '-framework glog' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-jsi' in project 'Pods' via options '-framework jsi' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-jsinspector' in project 'Pods' via options '-framework jsinspector' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-jsiexecutor' in project 'Pods' via options '-framework jsireact' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'libevent' in project 'Pods' via options '-framework libevent' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-logger' in project 'Pods' via options '-framework logger' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'react-native-change-icon' in project 'Pods' via options '-framework react_native_change_icon' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'react-native-safe-area-context' in project 'Pods' via options '-framework react_native_safe_area_context' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-hermes' in project 'Pods' via options '-framework reacthermes' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'React-perflogger' in project 'Pods' via options '-framework reactperflogger' in build setting 'OTHER_LDFLAGS' ➜ Implicit dependency on target 'Yoga' in project 'Pods' via I think I got some conflicts on Pods, but I can't get any info about what and how to resolve.
Any help, also on procedures to install dependencies in the right way, are welcome!
Thanks in advance
Источник:
https://stackoverflow.com/questions/780 ... nt-for-ios