New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Xcode 11] 'Multiple commands produce' error when building with new Xcode build system #1074
Comments
same here with 0.61.0-rc.3 and xcode 11 11A420a mojave 10.14.6 |
Same here. It looks like a bug or some new issue with new Xcode version. Error response is: Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. Detailed response: Build system information 1) Target 'NameOfTheProject' (project 'NameOfTheProject') has copy command from '/path/of/the/project/NameOfTheProject/node_modules/react-native-vector-icons/Fonts/Zocial.ttf' to '/path/of/the/project/NameOfTheProject/ios/build/NameOfTheProject/Build/Products/Debug-iphonesimulator/NameOfTheProject.app/Zocial.ttf' 2) That command depends on command in Target 'NameOfTheProject' (project 'NameOfTheProject'): script phase “[CP] Copy Pods Resources” Build system information 1) Target 'NameOfTheProject' (project 'NameOfTheProject') has copy command from '/path/of/the/project/NameOfTheProject/node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf' to '/path/of/the/project/NameOfTheProject/ios/build/NameOfTheProject/Build/Products/Debug-iphonesimulator/NameOfTheProject.app/SimpleLineIcons.ttf' 2) That command depends on command in Target 'NameOfTheProject' (project 'NameOfTheProject'): script phase “[CP] Copy Pods Resources” ... That response repeat for each .ttf file used by the library. I had to temporary |
Find a solution, simply remove duplicate reference fonts in "Copy Bundle Resources" NOT in "[CP] Copy Pods Resources" |
Removing duplicate font files in The problem seems to be caused by the new autolinking feature in React Native 0.60 - the line If you previously installed So to fix the problem, just remove the font files from |
Hi jackli, |
@jacklj can you help me, pls ! |
Is there anyway to disable this feature? We're still on .59 and the linking happens in our build process. We don't have our workspace committed, the pipeline literally does a pod install and react native link every time. Now our builds fail as its duplicating these fonts. |
@awgeorge We're in the same situation, what worked for us was to just choose the legacy build system in xcode 11.1. |
I had the same issue with the double linking stuff on Xcode.
I used this solution to get it to work for me: #661 (comment) But on the console i get this:
As long as I don't install the pod |
For anyone else who didn't know this, |
Thanks. Everyone providing a solution but no one saying where it is 👍 |
@ulises-jimenez the real mvp |
- one error was caused by react-native-vector-icons interacting poorly with the new autolinking feature. details: oblador/react-native-vector-icons#1074 (comment) - one was caused by renaming colors.js and textStyles.js to Colors and TextStyles earlier. Updates cases for these files.
Fixed it by removing fonts in the Copy Bundle Resource |
Real problem with module. Fixed it by removing fonts in the Xcode - Build Phases/[CP] Copy Bundle Resource |
Only remove fonts from build phases that are part of RNVI, if you are adding your own fonts you will need these under Copy Bundle Resource. |
Is there any way to avoid having manually go into XCode and remove the fonts from the Copy Bundle Resource tap when launching a new project using react-native-vector-icons and custom fonts with RN 0.6+ (autolink feature)? |
@jonasgroendahl This fixed it for me #1074 (comment) |
@marktdodds thanks, this worked! :) |
Be sure to have unchecked the “Target Membership” |
@RnbWd Incase you haven't found your workaround yet, my approach to avoid having to remove it after every pod install was the following:
|
@fungilation, i am pretty sure that this issue is very much still alive. let me know if i am missing something. i just wasted almost 90 minutes trying to figure out why this was happening in my app after upgrading some tooling. it would be unfortunately if this kept happening to more folks. it seems like the crux of the problem is that the font files are being referred to by both the the reference to the font files as assets in the while the reference to the font files as resources in the i suspect that the solution is to update either |
so to follow up on my earlier post ... i have a post install hook in my package.json that patches the |
To build on @carlost strategy, for me it was the podspec. Adding this to the scripts section on package.json fixed it for me.
|
@orinoco none should have to do that. Ever. |
which method did you use for the ios installation (https://github.com/oblador/react-native-vector-icons#ios) ... the cocoa pods one? I'm still getting a |
React Native Link [that I'm working on 0.64 version, so basically, Linked automatically after installation. |
For those want to know the reason behind it. When React has already auto linked vector icons and you do manual link there comes duplicate resources. |
Whyyyyyyyyyy is this still a thing :((((((((((((((((( |
I had to uncheck "For Install builds only" on [CP] Copy Pods Resources for it to work for me. Hopefully this helps someone. |
My fault was not editing my "info.plist" |
You save my life :( |
perfect ! |
Thank you. You saved my day Man!! |
Any option to remove those files from copy bundle resources dynamically (using command line) OR how to avoid adding those files |
Does anyone know how to fix this problem with AppCenter? |
Following this video finally got my fonts to show up. I was getting red question mark for a few hours and duplicate error message. Hope this helps someone out. |
|
* Fix duplicate icons issue on ios build oblador/react-native-vector-icons#1074 (comment)
* replace code with new npx react-native init command * rename package name * add @react-navigation/native as a dependency * By following https://reactnavigation.org/docs/getting-started/ for version 6.x * about us page in home screen * basic working home screen after fixing multiple issues * basic working screens on ios and android * use react-native-vector-icons * run on ios with icons * basic working side menu * Google Java Format * fix palette initilization for ios * Fix duplicate icons issue on ios build oblador/react-native-vector-icons#1074 (comment) * basic header and add all the existing screens * fix side menu on ios * fix labels, icons etc * Google Java Format * hamburger menu icon * fix about us screen and improved side menu * copy android code from old version to this version * fix android bridge issues * Google Java Format * use fastlane to build ios app * Basic test flight is working and failing with few errors from app store * Links https://semaphoreci.com/blog/apps-built-with-react-native-ios https://thecodingmachine.github.io/react-native-boilerplate/docs/BetaBuild/ https://docs.fastlane.tools/codesigning/getting-started/ * fix NSPhotoLibraryUsageDescription warning from apple * refactoring and improvements * color picker from image using color thief Co-authored-by: github-actions <>
you all were on xcode while i was looking on vscode xD |
UPDATE: Not sure what fixed it but it works now Nothing working for me. Anyone have any ideas? All the fonts added in my Info.plist with no duplicates: I also tried @goff-studio's workaround of unlinking, uninstalling and reinstalling the package and @mpeguese's video (creating a Fonts folder in the project folder) with the same results as above, My app builds fine but its the deploys using Fastlane that are having issues |
Worked for me : facebook/react-native#29709 (comment) |
removing icon files from Copy Bundle Resources worked for me |
this worked for me |
I didn't have to remove the icon files manually.
You might have to rerun |
Would be nice if the following was in the README.md telling users to remove the font files rather than adding them if they are using autolinking (the default on the latest react native).
|
For me, I deleted I listed the fonts in |
It's 2024, and this is the best answer here. Thanks for sharing! |
By Mistake I've deleted copy bundle resources now after build I'm getting black screen how do I fix this ? |
Environment
MacOS 10.14.6
RN 0.60.5
Latest RNVI
Building on iOS
Description
Describe your issue in detail. Include screenshots if needed.
Reproducible Demo
facebook/react-native#20492 (comment)
On Xcode before upgrade 11, things work correctly and font assets copy without fatal error.
After Xcode 11 stable released and upgraded, it required fonts removal under
[CP] Copy Pods Resources
in Build Phases. Subsequentpod update
brings them back, needing manual removal again.Not sure if this is fixable only with special treatment on Xcode >= 11?
The text was updated successfully, but these errors were encountered: