Build error on iOS after installing react-native-safe-area-context
See original GitHub issueGetting this error after installing the library for the first time and trying to build the project on xcode. it worked perfectly on android. I’m using RN 0.59.9
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_RNCSafeAreaProvider", referenced from:
objc-class-ref in libRNCSafeAreaContext.a(RNCSafeAreaView.o)
"_OBJC_CLASS_$_RNCSafeAreaShadowView", referenced from:
objc-class-ref in libRNCSafeAreaContext.a(RNCSafeAreaViewManager.o)
"_OBJC_CLASS_$_RNCSafeAreaViewLocalData", referenced from:
objc-class-ref in libRNCSafeAreaContext.a(RNCSafeAreaView.o)
"_UIEdgeInsetsEqualToEdgeInsetsWithThreshold", referenced from:
-[RNCSafeAreaView invalidateSafeAreaInsets] in libRNCSafeAreaContext.a(RNCSafeAreaView.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
react-native-safe-area-context - npm
Start using react-native-safe-area-context in your project by running `npm ... JavaScript tests iOS build Android build ... npx pod-install ...
Read more >react-native-safe-area-context throw ... - Stack Overflow
Short Solution: If you use ReactNative <= 0.63, install react-native-safe-area-context in V3 (e.g 3.4.1), as it's not compatible with v4 of ...
Read more >react-native-safe-area-context could not be found within the ...
1 Answer. Sorted by: 1. If you are using Yarn, try to: Remove the package with yarn remove. Reset the cache with yarn...
Read more >How to fix “RNCSafeAreaProvider” was not found in ... - Medium
1.) Uninstall the app. ... 3.) npx react-native run-android to build the app again. The “RNCSafeAreaProvider” was not found in the UIManager Error...
Read more >Getting Started - React Native Elements
This will throw an error though it won't prevent the application from running. To fix this you'll simply have to run react-native unlink...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I also ran into this issue. I am on RN 0.59 (still).
I was able to fix it my manually linking off of the files in the
SafeAreaView.xcodeproj
in my main Xcode project. I simply selected every Objective-C file inside thenode_modules/react-native-safe-area-context/ios/SafeAreaView
folder. For some reason it only had two of the files included, when there are many more.I’m happy to create a pull request if this is a solution desired in the library 😄
bah. it turns out it things have been a bit unstable with other libraries breaking ‘randomly’ too. i ended adding a step in my pipeline to find and replace any dependency
React
byReact-Core
and it seems to have improved matters. the command is$ find ./node_modules -name \*.podspec -exec sed -i '' "s/s.dependency.*['\"]React[\"']/s.dependency 'React-Core'/g" {} \;
HTH