react-native-screens: RNScreens doesn't build on ReactNative 0.73.5 for iOS

Description

Hi everyone

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 with Apple M2 processor 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/) for version 6.x 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 (
    <NavigationContainer>
      <Stack.Navigator>
        <Stack.Screen name="Splash" component={SplashScreen} />
      </Stack.Navigator>
    </NavigationContainer>
  );
}

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: I got this error

** BUILD FAILED **


The following build commands failed:
        Ld /Users/telemed/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 stucks 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-community/cli/blob/main/packages/cli-doctor/README.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: Target dependency graph (61 targets)
    Target 'ETMHOMECROSS' in project 'ETMHOMECROSS'
        ➜ Implicit dependency on target 'Pods-ETMHOMECROSS' in project 'Pods' via file 'Pods_ETMHOMECROSS.framework' in build phase 'Link Binary'
        ➜ Implicit dependency on target 'CocoaAsyncSocket' in project 'Pods' via options '-framework CocoaAsyncSocket' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-CoreModules' in project 'Pods' via options '-framework CoreModules' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'DoubleConversion' in project 'Pods' via options '-framework DoubleConversion' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-RCTAnimation' in project 'Pods' via options '-framework RCTAnimation' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-RCTBlob' in project 'Pods' via options '-framework RCTBlob' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-RCTFabric' in project 'Pods' via options '-framework RCTFabric' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-RCTImage' in project 'Pods' via options '-framework RCTImage' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-RCTLinking' in project 'Pods' via options '-framework RCTLinking' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-RCTNetwork' in project 'Pods' via options '-framework RCTNetwork' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-RCTSettings' in project 'Pods' via options '-framework RCTSettings' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-RCTText' in project 'Pods' via options '-framework RCTText' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'RCTTypeSafety' in project 'Pods' via options '-framework RCTTypeSafety' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'React-RCTVibration' in project 'Pods' via options '-framework RCTVibration' in build setting 'OTHER_LDFLAGS'
        ➜ Implicit dependency on target 'RNCMaskedView' in project 'Pods' via options '-framework RNCMaskedView' in build setting 'OTHER_LDFLAGS'
        ➜ 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

The output stops without saying anything else…

I think I got some conflicts on Pods, but I can’t get any info about what and how to resolve.

I also tried to clear my node_modules folder and package-lock.json file, re-install packages with npm adn pod install, but I still had the same issue, adding another failure:

** BUILD FAILED **
The following build commands failed:

...Debug-iphoneos/RNScreens/RNScreens.framework/RNScreens normal (in target 'RNScreens' from project 'Pods') 
.../Debug-iphoneos/RNReanimated/RNReanimated.framework/RNReanimated normal (in target 'RNReanimated' from project 'Pods') (2 failures)
Any help, also on procedures to install dependencies in the right way, are welcome!

Thanks in advance

Steps to reproduce

  1. Buy a MacMini with M2 processor
  2. Create a new ReactNative project with version 0.73.5
  3. Plug-in iOS device (in my case iPhone 14)
  4. Follow React Navigation guide
  5. Run iOS app with npx react-native run-ios

Snack or a link to a repository

Can’t reproduce on Snack just because i don’t use Expo

Screens version

^3.29.0

React Native version

0.73.5

Platforms

iOS

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

None

Build type

Debug mode

Device

Real device

Device model

iPhone 14

Acknowledgements

Yes

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 15 (2 by maintainers)

Most upvoted comments

Hey, I’m going to close this issue because:

  1. I’ve just failed to reproduce the issue, so that looks like you have some custom setup / default (old) caches which we can not really help you with changes on the library side (I’m leaving discussion open, so feel free to continue looking for solution here)
  2. Some people have reported that they were running on 0.73.5 just fine with recent version.
  3. There is no valid reproduction provided.

Not closing the discussion though, ping me if any new relevant detail emerges.

The current fix: Change the react-native-screens version to: "react-native-screens": "3.29.0"

https://github.com/software-mansion/react-native-screens/issues/2082