react-native-safe-area-context: Got an error on pod install
Hey, I firstly installed the npm package react-native-safe-area-context, then i run the command pod install in the /ios directory. I got this error. Can anyone help me with this issue ?
[!] Unable to find a specification for `RCT-Folly` depended upon by `react-native-safe-area-context`
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 5
- Comments: 19
Your Podfile specifies a minimum iOS target of
10.0but v4 ofreact-native-safe-area-contextrequires iOS 11 and above. You can fix this by changing the following line in your Podfile:to
TL;DR;
If you’re not running a modern version of
react-nativeyou’re going to get this error. And you can always checknode_modules/react-native/scripts/react_native_pods.rbto see if its specified in your version. Here’s a primitive check:CC @rafabulsing your version of
react-nativejust isn’t going to work.Detail
Alright, I was having this issue too. My usecase is that I’m building a
react-nativelibrary for which I generated the scaffolding vianpx create-react-native-libraryas documented here.I was then trying to install
react-native-safe-area-contextin the example app I was getting the same error documented above. So I started doing some digging, and realized that the generated app hadreact-native@0.63.4installed which is quite old. I think the technical term is “super-duper old”… and that version doesn’t have thethird-party-podspecslibrary installed.In my case it looks like the issue is with
npx create-react-native-library, not this lib.Try to use any other version I switched to
3.3.2.I added a section in the readme to document compatible versions
Sounds like an old dependency is cached. Try removing your Podfile.lock and run
pod installagain.