After following the installation instructions multiple times and clearing caches in between I still get build errors in Xcode 10:
react-native-navigation
installedI did two things, not sure which one worked:
Go to Product > Scheme > Edit Scheme
and modified it to look like this, move ReactNativeNavigation above React.
I have further issues with clean project, like https://github.com/facebook/react-native/issues/14382 etc.
Maybe time to upgrade to RN 0.56.0 and try to get that stable?
copy only when installing did the trick for me. Thanks! 👍
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest version and report back. Thank you for your contributions.
The issue has been closed for inactivity.
Possible temp Fix: https://github.com/facebook/react-native/issues/20492#issuecomment-409599358
You can try to change the build system to Legacy,
File > Workspace Settings > Build System > Legacy Build System.
Check "Copy only when installing"
and remove duplicate files that work for me
"Copy only when installing" works, however if you have a CI pipeline, or ever remove node modules folder and reinstall you'll need to do this step again (and again, and again).
We ended up adding a postinstall script to our package.json that updates
./node_modules/react-native-navigation/lib/ios/ReactNativeNavigation.xcodeproj/project.pbxproj
Ticking 'Copy only when installing' changes the following lines in this file:
Line 315
From: buildActionMask = 8;
To: buildActionMask = 12;
Line 322
From: runOnlyForDeploymentPostprocessing = 0;
To: runOnlyForDeploymentPostprocessing = 1;
We're just keeping a copy of the 'ticked' version of this project file in a scripts folder and are copying it across afterwards. Works like a charm
xcode_10_setup.sh
if [ ! -d "node_modules/react-native/third-party" ]; then
cd node_modules/react-native ; ./scripts/ios-install-third-party.sh ; cd ../../
fi
RNN_PROJECT_PATH='./node_modules/react-native-navigation/lib/ios/ReactNativeNavigation.xcodeproj/project.pbxproj'
cp -f ./scripts/rnn_project.pbxproj $RNN_PROJECT_PATH
I made a git patch file:
filename react-native-navigation+2.1.2.patch:
diff --git a/node_modules/react-native-navigation/lib/ios/ReactNativeNavigation.xcodeproj/project.pbxproj b/node_modules/react-native-navigation/lib/ios/ReactNativeNavigation.xcodeproj/project.pbxproj
index bb4c3ec..faaaf51 100644
--- a/node_modules/react-native-navigation/lib/ios/ReactNativeNavigation.xcodeproj/project.pbxproj
+++ b/node_modules/react-native-navigation/lib/ios/ReactNativeNavigation.xcodeproj/project.pbxproj
@@ -310,14 +310,14 @@
/* Begin PBXCopyFilesBuildPhase section */
D8AFADBB1BEE6F3F00A4592D /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
+ buildActionMask = 8;
dstPath = "include/$(PRODUCT_NAME)";
dstSubfolderSpec = 16;
files = (
50C5FD8320D7D6DD00F1EA8A /* RNNBridgeManagerDelegate.h in CopyFiles */,
50C5FD8220D7D6D600F1EA8A /* ReactNativeNavigation.h in CopyFiles */,
);
- runOnlyForDeploymentPostprocessing = 0;
+ runOnlyForDeploymentPostprocessing = 1;
};
/* End PBXCopyFilesBuildPhase section */
Then on post install I do:
git apply --ignore-whitespace react-native-navigation+2.1.2.patch
Until that's fixed, this works fine for me.
This is some how buggy but the solution by birkir works for me on ios. Thanks.
In android, some issues too with graddle versions but all solved.
I didn't found Check "Copy only when installing" option in xcode 10.1
I didn't found Check "Copy only when installing" option in xcode 10.1
You have to click ReactNativeNavigation.xcodeproj > Targets (ReactNativeNavigation) > Build Phases > Copy Files
This option is not available in 10.1 xcode
On Thu, Nov 22, 2018, 1:20 PM Chia Yu Pai <[email protected] wrote:
I didn't found Check "Copy only when installing" option in xcode 10.1
You have to click ReactNativeNavigation.xcodeproj > Targets
(ReactNativeNavigation) > Build Phases > Copy Files—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/wix/react-native-navigation/issues/3608#issuecomment-440941889,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AbWpQhbkAHAMCvuovdOV14ys4_Ylv85wks5uxldJgaJpZM4Va98A
.
@smartdev619 I'm using Xcode 10.1 and I was able to find it. Follow exactly the steps mentioned by @fantasywind.
ReactNativeNavigation.xcodeproj
is available under "Libraries" in your project navigator.
After the "copy only when installing" solution, I was facing the following error: 'React/RCTConvert.h' file not found
, for which this SO answer worked for me: https://stackoverflow.com/a/41488258/7414945
@platonish @fantasywind I neither can see Targets when selecting Libraries > ReactNativeNavigation.xcodeproj
like @smartdev619.
Here is the screenshot:
EDIT
Maybe it's because of an old V2 version I'm using (2.0.2478
)?
@nekdev i'm using RNN version 2.1.3-patch.2
Copy only when installing
Worked for me
Using RN 0.60.4 and RNN v3 Alpha 8, I got the same issue when building through CI.
On local XCode it was working fine and also when building with react-native run-ios, the issue was only happening when using Fastlane + Bitrise.
Logs here:
[15:58:07]: ▸ ❌ error: Multiple commands produce '/Users/vagrant/Library/Developer/Xcode/DerivedData/*****-dubjtuglydxuiregjbywrzzxpkqt/Build/Intermediates.noindex/ArchiveIntermediates/*****/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libReactNativeNavigation.a':
[15:58:07]: ▸ duplicate output file '/Users/vagrant/Library/Developer/Xcode/DerivedData/*****-dubjtuglydxuiregjbywrzzxpkqt/Build/Intermediates.noindex/ArchiveIntermediates/*****/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libReactNativeNavigation.a' on task: CreateUniversalBinary /Users/vagrant/Library/Developer/Xcode/DerivedData/*****-dubjtuglydxuiregjbywrzzxpkqt/Build/Intermediates.noindex/ArchiveIntermediates/*****/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libReactNativeNavigation.a normal armv7 arm64 (in target 'ReactNativeNavigation')
[15:58:07]: ▸ duplicate output file '' on task: CreateUniversalBinary /Users/vagrant/Library/Developer/Xcode/DerivedData/*****-dubjtuglydxuiregjbywrzzxpkqt/Build/Intermediates.noindex/ArchiveIntermediates/*****/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libReactNativeNavigation.a normal armv7 arm64 (in target 'ReactNativeNavigation')
[15:58:07]: ▸ duplicate output file '' on task: SetMode u+w,go-w,a+rX /Users/vagrant/Library/Developer/Xcode/DerivedData/*****-dubjtuglydxuiregjbywrzzxpkqt/Build/Intermediates.noindex/ArchiveIntermediates/*****/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libReactNativeNavigation.a (in target 'ReactNativeNavigation')
[15:58:07]: ▸ duplicate output file '' on task: SetOwnerAndGroup vagrant:staff /Users/vagrant/Library/Developer/Xcode/DerivedData/*****-dubjtuglydxuiregjbywrzzxpkqt/Build/Intermediates.noindex/ArchiveIntermediates/*****/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libReactNativeNavigation.a (in target 'ReactNativeNavigation')
[15:58:07]: ▸ duplicate output file '' on task: SetOwnerAndGroup vagrant:staff /Users/vagrant/Library/Developer/Xcode/DerivedData/*****-dubjtuglydxuiregjbywrzzxpkqt/Build/Intermediates.noindex/ArchiveIntermediates/*****/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libReactNativeNavigation.a (in target 'ReactNativeNavigation')
Lib wasn't installed via CocoaPods, it was manually linked. I fixed it by not linking it manually or via CocoaPods, it should be auto-linked now. I removed all the references I originally had added when linking the project.
I feel like maybe we could have a more detailed set of instructions for the latest version of RN, due to the changes with how libraries are linked. I could collaborate by going over the steps on a new project.
Note: I didn't try it, but I assume that using Legacy Build System from XCode (in Bitrise's stack) would have masked the issue, but since this is a new project we don't encourage using anything that has been declared as legacy.
@eduardopelitti Any luck solving this? Happens to us also in Bitrise.
@eduardopelitti Any luck solving this? Happens to us also in Bitrise.
Hi, I fixed it by removing the manual link of the library and removing it from CocoaPods as well. I removed all references to RNN in my iOS Setup, except the reference in the Header Search path.
And in my Podfile I have:
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "yoga"
target.remove_from_project
end
if target.name == "React"
target.remove_from_project
end
end
end
In Bitrise you could try to use the Legacy Build System from the stack (Xcode 9.4) if it still available. This is of course not ideal.
Let me know if it helped.
Hi I fixed it by doing this
Check 'Run script only when installing'
This also fixed my issue with
Hi I fixed it by doing this
Check 'Run script only when installing'
This also fixed my issue with
- Unrecognized Ionicons after installing react-native-vector-icons
this worked for me, Thanks a lot @adjoaEdwin
fixed my issue doing this
set "Build System" to "Legacy Build System" in "Shared Workspace Settings" which you can find in "File --> Workspace Settings"
Most helpful comment
I did two things, not sure which one worked:
Check "Copy only when installing"
Go to
Product > Scheme > Edit Scheme
and modified it to look like this, move ReactNativeNavigation above React.