react-native-device-info: Linker fails with ld: library not found for -lRNDeviceInfo
Summary
Version | 0.21.4 |
Affected OS | MacOS Sierra |
OS Version | 10.12.6 |
Current behavior
when building the project for release:
xcodebuild "-project" "ios/FleetFox.xcodeproj" "-scheme" "FleetFox" "-configuration" "Release" "archive" "-verbose" | xcpretty
The linker fails with:
ld: library not found for -lRNDeviceInfo
Expected behavior
It should build without errors. Downgrading the package to 0.21.1 fixes the problem.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 20
- Comments: 18
Commits related to this issue
- fix: Make sure iOS project bulds correctly This was caused by a change in react-native-device-info: https://github.com/rebeccahughes/react-native-device-info/issues/378 — committed to borisyankov/zulip-mobile by borisyankov 6 years ago
- fix: Make sure iOS project bulds correctly This was caused by a change in react-native-device-info: https://github.com/rebeccahughes/react-native-device-info/issues/378 — committed to zulip/zulip-mobile by borisyankov 6 years ago
- fix: Make sure iOS project bulds correctly This was caused by a change in react-native-device-info: https://github.com/rebeccahughes/react-native-device-info/issues/378 — committed to jainkuniya/zulip-mobile by borisyankov 6 years ago
- re-link react-native-device-info see https://github.com/rebeccahughes/react-native-device-info/issues/378 — committed to StoDevX/AAO-React-Native by hawkrives 6 years ago
- re-link react-native-device-info see https://github.com/rebeccahughes/react-native-device-info/issues/378 — committed to StoDevX/AAO-React-Native by hawkrives 6 years ago
just the usual rn fuckery
I got the same problem when I updated to the latest version. You can fix it by opening to project in xcode. And navigate to the library folder in the left panel of your xcode. And then remove the old DeviceInfo.xcodeproj and add it manually from the related node_modules.
In XCode, in the project navigator:
Right click Libraries Add Files to [your project’s name] Go to node_modules/react-native-device-info Add the .xcodeproj file
This is due to the change made in #374. Sorry for the inconvenience folks, I’ll add a new entry in the troubleshooting section.
my xcode doesn’t allow me to select the .xcodeproj file, but only the upper
ios
folder…