Closed vikrvm closed 2 years ago
I figured it actually by digging through another thread, from the root of your project run the following. Cheers.
cd ios && RCT_NEW_ARCH_ENABLED=1 pod install
Edit: When you add a package to your project and need to run a pod install, use the command above so the new arch stays enabled. Otherwise, you will return to your error state until you run it again. Just a heads up.
Oh my god @MyPalVikram I want to wish you a happy new year coming up, thank you so much. You have saved me after 4.5 hours of debugging.
Thank you!
didnt work with me
I figured it actually by digging through another thread, from the root of your project run the following. Cheers.
cd ios && RCT_NEW_ARCH_ENABLED=1 pod install
Edit: When you add a package to your project and need to run a pod install, use the command above so the new arch stays enabled. Otherwise, you will return to your error state until you run it again. Just a heads up.
hi, i just wanted to say thank you and i wanted to give you a small donation but was unable to find a link.
After about 20 hours searching for wtf was happening with the project im trying to build for iOS, your answer was the answer i needed, i tried a 100 thousand things.
thankyou and i hope someday iOS rots in hell.
I figured it actually by digging through another thread, from the root of your project run the following. Cheers.
cd ios && RCT_NEW_ARCH_ENABLED=1 pod install
Edit: When you add a package to your project and need to run a pod install, use the command above so the new arch stays enabled. Otherwise, you will return to your error state until you run it again. Just a heads up.hi, i just wanted to say thank you and i wanted to give you a small donation but was unable to find a link.
After about 20 hours searching for wtf was happening with the project im trying to build for iOS, your answer was the answer i needed, i tried a 100 thousand things.
thankyou and i hope someday iOS rots in hell.
Hey, thank you for the gesture! But it's totally fine I'm glad I was able to help! ❤️
@mypalvikram thanks for sharing the solution. Sadly it didn't work for me. I feel like I'm on the right track but I might be missing something minor. Can you please help me out?
Here are the logs i get after running the command you shared:
Using firebase.json from '/Users/username/Desktop/appDir/firebase.json'
Adding a custom script phase for Pod RNFBApp: [RNFB] Core Configuration
Auto-linking React Native modules for target `AppName`: BVLinearGradient, Expo, RCTSystemSetting, RNAudioRecorderPlayer, RNCAsyncStorage, RNCClipboard, RNCMaskedView, RNCPushNotificationIOS, RNDefaultPreference, RNDeviceInfo, RNExitApp, RNFBApp, RNFBMessaging, RNFS, RNGestureHandler, RNKeychain, RNNotifee, RNPermissions, RNReanimated, RNSVG, RNScreens, RNShare, RNSoundPlayer, RNUserDefaults, intercom-react-native, jail-monkey, react-native-blob-util, react-native-camera, react-native-cookies, react-native-document-picker, react-native-flipper, react-native-geolocation-service, react-native-image-picker, react-native-image-resizer, react-native-maps, react-native-netinfo, react-native-pdf, react-native-progress-bar-android, react-native-progress-view, react-native-render-html, react-native-safe-area-context, react-native-select-contact, react-native-slider, react-native-splash-screen, react-native-video, and react-native-webview
Using Expo modules
Setting USE_CODEGEN_DISCOVERY=1
[Codegen] Adding script_phases to React-Codegen.
[Codegen] Generating ./build/generated/ios/React-Codegen.podspec.json
[Codegen] Processing react-native core libraries
[Codegen] Found react-native
[Codegen] >>>>> Searching for codegen-enabled libraries in /Users/username/Desktop/appDir/node_modules
[Codegen] Found react-native-gesture-handler
[Codegen] Found react-native-safe-area-context
[Codegen] Found react-native-screens
[Codegen] >>>>> Searching for codegen-enabled libraries in the app
[Codegen] >>>>> Processing FBReactNativeSpec
[Codegen] Generated schema: /var/folders/45/bnxr8njs51n5nqyfy11cjmyw0000gn/T/FBReactNativeSpec21gz0n/schema.json
[Codegen] Generated artifacts: /Users/username/Desktop/appDir/ios/build/generated/ios/FBReactNativeSpec
[Codegen] >>>>> Processing rncore
[Codegen] Generated schema: /var/folders/45/bnxr8njs51n5nqyfy11cjmyw0000gn/T/rncoreniY7Q0/schema.json
[Codegen] Generated artifacts: /Users/username/Desktop/appDir/ios/build/generated/ios/react/renderer/components/rncore
[Codegen] >>>>> Processing rngesturehandler
[Codegen] Generated schema: /var/folders/45/bnxr8njs51n5nqyfy11cjmyw0000gn/T/rngesturehandler8KIHfw/schema.json
[Codegen] Generated artifacts: /Users/username/Desktop/appDir/ios/build/generated/ios/react/renderer/components/rngesturehandler
[Codegen] >>>>> Processing SafeAreaContextSpec
[Codegen] Generated schema: /var/folders/45/bnxr8njs51n5nqyfy11cjmyw0000gn/T/SafeAreaContextSpecTO3TMh/schema.json
[Codegen] Generated artifacts: /Users/username/Desktop/appDir/ios/build/generated/ios/SafeAreaContextSpec
[Codegen] >>>>> Processing safeareacontext
[Codegen] Generated schema: /var/folders/45/bnxr8njs51n5nqyfy11cjmyw0000gn/T/safeareacontexttXqSnJ/schema.json
[Codegen] Generated artifacts: /Users/username/Desktop/appDir/ios/build/generated/ios/react/renderer/components/safeareacontext
[Codegen] >>>>> Processing rnscreens
[Codegen] Generated schema: /var/folders/45/bnxr8njs51n5nqyfy11cjmyw0000gn/T/rnscreensJTvd0I/schema.json
[Codegen] Generated artifacts: /Users/username/Desktop/appDir/ios/build/generated/ios/react/renderer/components/rnscreens
>>>>> Creating component provider
Generated schema list: /var/folders/45/bnxr8njs51n5nqyfy11cjmyw0000gn/T/rn-tmp-schema-list.json
Generated provider in: /Users/username/Desktop/appDir/ios/build/generated/ios
[Codegen] Done.
Pull request detected: null
Analyzing dependencies
RNFBApp: Using overridden static_framework value of 'true'
RNFBMessaging: Using overridden static_framework value of 'true'
Downloading dependencies
Generating Pods project
/Users/username/Desktop/appDir/ios/Pods/Target Support Files/Pods-AppName/Pods-AppName.release.xcconfig
/Users/username/Desktop/appDir/ios/Pods/Target Support Files/Pods-AppName/Pods-AppName.debug.xcconfig
/Users/username/Desktop/appDir/ios/Pods/Target Support Files/Pods-AppName-AppNameTests/Pods-AppName-AppNameTests.release.xcconfig
/Users/username/Desktop/appDir/ios/Pods/Target Support Files/Pods-AppName-AppNameTests/Pods-AppName-AppNameTests.debug.xcconfig
Setting REACT_NATIVE build settings
Integrating client project
expo_patch_react_imports! took 0.1606 seconds to transform
files.
Pod installation complete! There are 126 dependencies from the Podfile and 125 total pods installed.
[!] [Codegen] warn: using experimental new codegen integration
[!] Can't merge user_target_xcconfig for pod targets: ["RNReanimated", "React-RCTFabric", "hermes-engine"]. Singular build setting CLANG_CXX_LANGUAGE_STANDARD has different values.
[!] Can't merge user_target_xcconfig for pod targets: ["RNReanimated", "React-RCTFabric", "hermes-engine"]. Singular build setting CLANG_CXX_LANGUAGE_STANDARD has different values.
[!] Can't merge user_target_xcconfig for pod targets: ["RNReanimated", "React-RCTFabric", "hermes-engine"]. Singular build setting CLANG_CXX_LANGUAGE_STANDARD has different values.
[!] Can't merge user_target_xcconfig for pod targets: ["RNReanimated", "React-RCTFabric", "hermes-engine"]. Singular build setting CLANG_CXX_LANGUAGE_STANDARD has different values.
@AbreezaSaleem What version of RN are you using? When I first posted this it was before many changes and updates so I can help check if that still applies.
@mypalvikram i am using "react-native": "0.69.5"
Was able to fix my error following the steps mentioned here: https://github.com/facebook/react-native/issues/34106#issuecomment-1179485220
Edit: found the actual fix. Apparently, the error was getting caused after an update to XCode to 14.3.0
. More details can be found here: https://github.com/facebook/react-native/pull/36759. You need to update react-native
to 0.70.8
to fix the issue.
I figured it actually by digging through another thread, from the root of your project run the following. Cheers.
cd ios && RCT_NEW_ARCH_ENABLED=1 pod install
Edit: When you add a package to your project and need to run a pod install, use the command above so the new arch stays enabled. Otherwise, you will return to your error state until you run it again. Just a heads up.
I figured it actually by digging through another thread, from the root of your project run the following. Cheers.
cd ios && RCT_NEW_ARCH_ENABLED=1 pod install
Edit: When you add a package to your project and need to run a pod install, use the command above so the new arch stays enabled. Otherwise, you will return to your error state until you run it again. Just a heads up.
Hello, I have the same issue but when I try to run the command I get the following error:
!] Invalid Podfile
file:
[!] Invalid RNReanimated.podspec
file: [react-native-reanimated] Reanimated 2.x does not support Fabric. Please upgrade to 3.x to use Reanimated with the New Architecture. For details, see https://blog.swmansion.com/announcing-reanimated-3-16167428c5f7.
I cannot update React-reanimated though because other dependencies will break: any thoughts on that will be appreciated:
I figured it actually by digging through another thread, from the root of your project run the following. Cheers.
cd ios && RCT_NEW_ARCH_ENABLED=1 pod install
Edit: When you add a package to your project and need to run a pod install, use the command above so the new arch stays enabled. Otherwise, you will return to your error state until you run it again. Just a heads up.
Resolved my iOS building app.
mac apple m2 pro sonoma 14.4.1 device apple 15pro ios 17.2 xcode 15.2/15.4 build failed with Command PhaseScriptExecution failed with a nonzero exit code in xcode and
in terminal explicit dependency on target 'React-Codegen' in stopped when running ios emulator in react native
Description
iOS was working fine until this error appeared:
Not sure why this occurred after hours of working, but I can't seem to find a solution. I did come across this page that outlines what to do for versions for >0.69.0
https://fbflipper.com/docs/getting-started/react-native/
Version
0.70.0
Output of
npx react-native info
System: OS: macOS 13.0 CPU: (10) arm64 Apple M1 Max Memory: 1.26 GB / 32.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 18.9.0 - /opt/homebrew/bin/node Yarn: 1.22.18 - ~/.yarn/bin/yarn npm: 8.19.1 - /opt/homebrew/bin/npm Watchman: Not Found Managers: CocoaPods: 1.11.3 - /Users/vikrampal/.rbenv/shims/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0 Android SDK: Not Found IDEs: Android Studio: 2021.2 AI-212.5712.43.2112.8815526 Xcode: 14.0/14A309 - /usr/bin/xcodebuild Languages: Java: 18.0.2 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.1.0 => 18.1.0 react-native: 0.70.0 => 0.70.0 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
Running
yarn ios --simulator="iPhone 14 Pro Max"
Snack, code example, screenshot, or link to a repository
Podfile