Skip to content

Instantly share code, notes, and snippets.

@thechaudharysab
Last active September 3, 2022 08:16
Show Gist options
  • Save thechaudharysab/8681c61fb947a966565218b36b2d367d to your computer and use it in GitHub Desktop.
Save thechaudharysab/8681c61fb947a966565218b36b2d367d to your computer and use it in GitHub Desktop.
CocoaPods could not find compatible versions for pod "React-RCTActionSheet"

CocoaPods could not find compatible versions for pod "React-RCTActionSheet"

I started getting this error:

  In Podfile:
    React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)

Specs satisfying the `React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)` dependency were found, but they required a higher minimum deployment target.

How did it happen:

For me I started a project a few months back and then didn't get time to work on it. A few month later things were outdated so I decided to updated my all libraries in my package.json file to latest. Without taking careful measures as the project only had one screen but there was firebase configured as well. So, after updating react native and other packages to latest versions I ran pod insall and started getting this error for React-RCTActionSheet which might be a different name but similar error for others.

Solution:

The solution is general and should work for failures other than React-RCTActionSheet.

  1. First thing to see is if your platform :ios, '12.4' (For me it was 11.0) version is not low. Try to change it to a higher version also in XCode > Target > Build Settings > Change deployment version to a bit higher one.
  2. After doing that make sure you have your npm install already finished. Then delete Pods folder and Podfile.lock and then cd ios and run this pod install --repo-update
  3. (optional) Clean the derived data folder rm -rf ~/Library/Developer/Xcode/DerivedData and opening in XCode and doing cmd + shift + k might help.

Doing so the pods started to install.

Screenshot 2022-09-03 at 3 52 36 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment