Build error in Xcode by react-native code - ios

This is my error:
Build system information
error: Multiple commands produce '/Users/tanhaeirad/Project/Rahanj/RezasPortal/portalapp/ios/build/Build/Products/Debug-iphonesimulator/portalapp.app/AntDesign.ttf':
1) Target 'portalapp' (project 'portalapp') has copy command from '/Users/tanhaeirad/Project/Rahanj/RezasPortal/portalapp/node_modules/native-base/Fonts/AntDesign.ttf' to '/Users/tanhaeirad/Project/Rahanj/RezasPortal/portalapp/ios/build/Build/Products/Debug-iphonesimulator/portalapp.app/AntDesign.ttf'
2) Target 'portalapp' (project 'portalapp') has copy command from '/Users/tanhaeirad/Project/Rahanj/RezasPortal/portalapp/node_modules/react-native-vector-icons/Fonts/AntDesign.ttf' to '/Users/tanhaeirad/Project/Rahanj/RezasPortal/portalapp/ios/build/Build/Products/Debug-iphonesimulator/portalapp.app/AntDesign.ttf'
but my code run in simulator
i code with react native and this error shown when i install react-native base

In Xcode, go to < one of the library target names > => Build Phases => Copy Bundle Resources and remove the font that's causing the issue. This should ensure that it only gets copied into the app package once. It probably doesn't matter which of those two libraries you remove it from.

Related

Not able to Run React native IOS App on new Xcode version 13

I have upgraded Xcode version13 .I started getting error trying to running ios app and the build always gets failed .
if I choose the option legacy build System it throws error :
The Legacy Build System will be removed in a future release. You can configure the selected build system and this deprecation message in File > Workspace Settings.
If I choose New Build System It throws error : **Multiple commands produce '/Users/username/Library/Developer/Xcode/DerivedData/Project-fqdjurlyjvhihgfubhiaayzhaadv/Build/Products/Debug-iphonesimulator/myproject.app/AntDesign.ttf':
Target 'Project' (project 'Project') has copy command from '/Users/username/Desktop/Project/employee-mobile-app/node_modules/react-native-vector-icons/Fonts/AntDesign.ttf' to '/Users/username/Library/Developer/Xcode/DerivedData/Project-fqdjurlyjvhihgfubhiaayzhaadv/Build/Products/Debug-iphonesimulator/myproject.app/AntDesign.ttf'
That command depends on command in Target 'Project' (project 'project Name'): script phase “[CP] Copy Pods Resources”
**
what all I have tried :
deleted repo and cloned it again
did pod install again
removed some file from Build Phase => copy bundle Resource
Delete Drived data
Choose the option "Don not show a diagnostic issue about build system depreciation "

multiple commands produce error in xcode 11.4 react native my copy bundle resources are empty

following is the error in xcode
I have also tried build legacy from workspace settings but failed to do so.
Multiple commands produce '/Users/saifubaid/Library/Developer/Xcode/DerivedData/antispam-bjwrxskogxnnophfhgkpyxxcqcuj/Build/Intermediates.noindex/ArchiveIntermediates/antispam/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle':
Target 'React-Core.common-AccessibilityResources' has create directory command with output '/Users/saifubaid/Library/Developer/Xcode/DerivedData/antispam-bjwrxskogxnnophfhgkpyxxcqcuj/Build/Intermediates.noindex/ArchiveIntermediates/antispam/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle'
Target 'React-Core.common-CoreModulesHeaders-AccessibilityResources' has create directory command with output '/Users/saifubaid/Library/Developer/Xcode/DerivedData/antispam-bjwrxskogxnnophfhgkpyxxcqcuj/Build/Intermediates.noindex/ArchiveIntermediates/antispam/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle'
stuck on it. tried almost every solution.
Multiple commands produce '/Users/shubhamnagota/dev/zest/zest-app/ios/DerivedData/zestapp/Build/Intermediates.noindex/ArchiveIntermediates/zestapp/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/AccessibilityResources.bundle':
Click on Pods App
From the list remove React-Core-AccessibilityResources
Clean Project
Build Again
Archive.
Worked for me! :)

I cant build an iOS project

When I try to build my project I get this same error
error: Multiple commands produce '/Users/shaka0241/Library/Developer/Xcode/DerivedData/tutores-ckkpuvpkfwcscbfxzqbzibwjihlk/Build/Products/Debug-iphonesimulator/tutores.app/Frameworks/Alamofire.framework':
1) Target 'tutores' has copy command from '/Users/shaka0241/ios-tutores/Carthage/Build/iOS/Alamofire.framework' to '/Users/shaka0241/Library/Developer/Xcode/DerivedData/tutores-ckkpuvpkfwcscbfxzqbzibwjihlk/Build/Products/Debug-iphonesimulator/tutores.app/Frameworks/Alamofire.framework'
2) That command depends on command in Target 'tutores': script phase “Carthage Copy Frameworks”
Clean build folder and try deleting the DerivedData folder (and re-build)
Check all your Info.plist files for any inconsistencies (especially when working with SiriKitIntents)
Check your Target Memberships & frameworks you import
Those solved it whenever I had this problem..
Also possible dup:
Xcode 10 Error: Multiple commands produce

Getting error in Xcode no such file or directory found with libReactNativeLocalization.a during build and archive

I am having issue in Xcode while I try to build or archive my react-native project. Xcode throwing error like no such file or directory: '/Users/...../DerivedData/myproject/Build/Products/Debug-iphonesimulator/libReactNativeLocalization.a'.
when I run react-native run-ios or in release mode react-native run-ios --configuration Release then it is working perfectly fine but when I try to build or archive it from Xcode then it is throwing error.
I am using Xcode version 10
My react-native version is 0.57.4
iOS development target is 9.0
react-native-localization version is 2.0.3
Tried things which didn't worked for me
Removed node_modules and pods completely and run npm install and pod install didn't worked for me .
In menue File --> workspace setting changed build system from Use Shared System to Legacy build system. in this particular case app is build and archived successfully but when I lunch my app then it crashes after splash screen.
Removed Derived Data completely and rebuild again still getting this error.
If I remove react-native-localization completely from my project then all the things are working fine and I am able to build and archive the project.
When we run react-native link react-native-localization command then it also applies the changes on ios app too which creates an issue in our case. So due to this command, it creates an entry in project_name → ios → podfile (podfile)
Here ReactNativeLocalization is pointing to project_name/node_modules/react-native-localization directory due to this line when we run pod install command then there is one dependence React in this package is going to reinstall in your pods as you can see in this image.(as you can see here)
Follow the following steps to overcome form this issue
After react-native link react-native-localization command navigate to project_name → ios → podfile and remove or comment pod ‘ReactNativeLocalization’, :path => ‘../node_modules/react-native-localization’
Now its time to link react-native-localization library manually from Xcode. So to link this library manually open project_name → ios → project_name.xcworksace file in Xcode and select your target.
After that in project navigator right click on library and select Add Files to “...” and after that navigate to project_name → node_modules → react-native-localization and select ReactNativeLocalization.xcodeproj file.
Now navigate to project Target → Build Phase and expand Link Binary With Library after that click on plus icon and add libReactNativeLocalization.a library
I had been stuck on this issue since morning. A simple hack made my build.
I observed that in folder Xcode/DerivedData/MyProject/Build/Products/Debug-iphonesimulator/ lib files were being generated in their folder. i.e libLinearGradient.a was in libLinearGradient.
One .a file which was being successfully lined was there without it's folder so I did the same for all .a files. ( Simply put them outside without their folder.)
So now path became Xcode/DerivedData/MyProject/Build/Products/Debug-iphonesimulator/libLinearGradient.a instead of Xcode/DerivedData/MyProject/Build/Products/Debug-iphonesimulator/libLinearGradient/libLinearGradient.a

Xcode install target library dependency on executable Run

I have a target executable A.
A links against a target dynamic library B in the same project.
I would like that each time in Xcode, i run A (⌘R), i will get B installed into it's INSTALL_PATH on device/simulator.
I Tried to add to A post build events, a RunScript to copy B manually, and also tried to use "Copy Build Phase" on A target but it all failed. Nothing which i have tried seems to get B installed on it's target install directory.

Resources