Weird-Ass Linking-Related Bug
When I try to make an archive build in Xcode 10.3
Environment info
- RN: 0.59.3
- Xcode: 10.3
- React Native Gesture Handler (RNGH): 1.4.1
- React-Navigation: 3.11.0
React Native info output:
...
/Users/me/Library/Developer/Xcode/DerivedData/MyApp-somehash/Build/Intermediates.noindex/ArchiveIntermediates/appId/BuildProductsPath/Release-iphoneos/libRNGestureHandler.a -lPods-appId -lRNFirebase -lAppCenterReactNative -lAppCenterReactNativeAnalytics -lAppCenterReactNativeCrashes -Xlinker -dependency_info -Xlinker
...
clang: error: no such file or directory: '/Users/me/Library/Developer/Xcode/DerivedData/MyApp-somehash/Build/Intermediates.noindex/ArchiveIntermediates/appId/BuildProductsPath/Release-iphoneos/libRNGestureHandler.a'
Command Ld failed with a nonzero exit code
Steps To Reproduce
After installing (if I remember correctly) Microsoft's App Center tools (although it could have been React Navigation), I noticed my archive builds started failing with the uncategorized error above. The strange thing is that It seems to work fine when I run the build in a simulator or on my iPhone.
What I've tried so far:
- Deleting and re-adding the RNGH library, and then manually adding the link to the build phase. This attempt had no change in the error. Re: https://github.com/kmagiera/react-native-gesture-handler/issues/735
- Removing the link to RNGH altogether. This attempt forced a new error because of the libraries that are dependent on this. Re: https://github.com/kmagiera/react-native-gesture-handler/issues/614
- Tried some of the methods here. Build fails with "Command failed with a nonzero exit code"
- Tried changing the version of the app to 9.0 to match the version of RNGH. Results didn't change. https://github.com/react-native-community/react-native-push-notification-ios/issues/17
- Tried using Xcode's legacy builder
- Purging all React Native cache
- Removing and re-installing node_modules
- Removing and reinstalling pods
- Cleaning the build folder
- Restarting Xcode
- Restarting my laptop
Full environment info from package.json:
"dependencies": {
"@react-native-community/blur": "^3.3.1",
"appcenter": "2.0.0",
"appcenter-analytics": "2.0.0",
"appcenter-crashes": "2.0.0",
"expo-keep-awake": "^5.0.1",
"expo-localization": "^5.0.0",
"i18n-js": "^3.2.2",
"moment": "^2.24.0",
"react": "16.8.3",
"react-native": "0.59.3",
"react-native-code-push": "^5.6.0",
"react-native-config": "^0.11.7",
"react-native-elements": "^1.1.0",
"react-native-firebase": "^5.4.3",
"react-native-gesture-handler": "^1.3.0",
"react-native-maps": "^0.24.2",
"react-native-paper": "^2.16.0",
"react-native-snap-carousel": "^3.8.0",
"react-native-unimodules": "^0.4.0",
"react-native-vector-icons": "^6.5.0",
"react-navigation": "^3.11.0",
"react-redux": "^7.0.3",
"redux": "^4.0.1",
"redux-persist": "^5.10.0",
"redux-starter-kit": "^0.5.1",
"redux-thunk": "^2.3.0"
}