Uninstall package linked in cocoa pods for react native 0.63 - react-native

I have an npm package I installed which I linked to cocoa pods via
npx pod install
I am looking to uninstall this pod as I have already uninstalled the npm package and am having trouble finding an article I am confident in trying since I am new to react-native and want to avoid crashing my app by making a mistake. Is there any easy process to complete this task?
EXTRA
xCode 12.4
React Native 0.63

When you do Pod install, it checks package.json and install pods for only those packages thats requires pod installation. RN v0.63 handles linking and unlinking itself, you don't need to worry about that, it has nothing to do with pod install command. Just do npm uninstall <package-name> and then re-run pod install to update pods as per package.json.

Related

#<WeakSet> could not be cloned

I have a React Native application that I recently updated.
However, on the majority of my modules, I have this error:
#<WeakSet> could not be cloned.
For example, on the module : #react-native-mapbox-gl
When I launch my application, I get the error :
node_modules\#react-native-mapbox-gl\maps\javascript\modules\snapshot\snapshotManager.js: #<WeakSet> could not be cloned.
I also have it on my react-native-vector-icons module.
Is this a common problem?
Thank you!
stop metro
reset repo
reinstall node_packages
run pod install --repo-update
Try deleting node_modules and reinstall with npm install or yarn install again, and then:
IOS:
pod update SDWebImageWebPCoder
pod install --repo-update
build project in Xcode
Android:
Open in Android Studio and Refresh Gradle Dependencies.
build project in Android Studio

React Native - pod install issue "cannot load such file.......node_modules/react-native/scripts/react_native_pods"

when I have a react native project....and when I run pod install it gives me the following error
Invalid `Podfile` file: cannot load such file -- /myPath/node_modules/react-native/scripts/react_native_pods
Here is my podfile
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
platform :ios, '10.0'
target 'xs' do
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
target 'xsTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
end
end
target 'xs-tvOS' do
# Pods for xs-tvOS
target 'xs-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
Ive checked and there is no file called react_native_pods in location myPath/node_modules/react-native/scripts/.
Im wondering if its something to do with npm install is not generating correct files.....however I upgraded node to most recent version and then ran npm install
I ran npm audit fix and it added react_native_pods file and pod install then worked
Run npm audit fix ==> cd ios ==> pod install
If npm audit fix is not working for you then try below solution.
- sudo gem install cocoapods
- npm i
- cd ios
- pod install
It can also be that you just forgot to run yarn / npm before running pod install.
I have meet the same error, solved by upgrade the version of React Native from 0.62 to 0.63, it works for me
Because of the file react_native_pods does't exists in the folder scripts when the version is 0.62, It appears when I upgraded the version of RN to 0.63, after npm install , It works when pod install, hope it would help other who encounter the same error
I just did npm install before running pod install and it solved for me.
In my case Ive deleted yarn.lock, podfile.lock and it worked fine after yarn and pod install again
in order to fix this: what i did is:
react-native upgrade: It mainly upgrades react-native version, which will also upgrade some of your ios files such as Podfile amongst other things.
Try if this works for you or not. You can also create a latest react native project and compare your files/directories using "Beyond compare", also you need to rename some lines in your files.
Also read the comments in files for better understanding.
This wroked for me:
cd ios
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
Via this link.
I had this error in 2022 and this was the most relevant search result and didn't fix it.. so in case anyone else out there is running into this, I fought this for days and finally fixed it by:
Creating a brand new directory by: expo init new-project and then copy over your .js files, screens, and assets etc. Do this by hand, don't copy any of your lock files or node-modules or anything else. Just the files that you created/touched yourself. Then expo start. Load the project on your mobile / simulator and when it fails with a module requirement missing add it individually. Repeat this start-error-add until the build succeeds. This was the only way I found to get it working.
Make sure you've installed your npm dependencies.
Run following command and then install pods.
To install npm packages:
yarn install
And then, remove old pod cache:
cd ios && pod deintegrate && rm -rf Podfile.lock
To update pods and start ios:
pod install --repo-update && cd .. && react-native run-ios
Yarn
cd ios
pod install
Works for me
just install,
#react-native-community/cli-platform-ios
in package.json
then yarn install in your root and cd ios and also arch -x86_64 pod install
verify that you have a node_modules folder, I was missing that
Go and add react-native.pods.rb file inside of Node_Module->React-Native->Scripts->(add here)

how do I delete library clearly in react native?

I want to delete react-native-google-signin library.
so I remove it using 'yarn remove react-native-google-signin'
But when I bulid my app, it seems to be there.
How can I solve this error?
In your scenario, after removing library or package you need to do pod install after that for iOS..
SOLUTION
if you are using yarn
yarn remove react-native-google-signin
If you are using npm
npm uninstall --save react-native-google-signin
After that move into your ios folder using cd ios
Then run pod install using pod install
Finally, close existing workspace from XCODE and reopen and before run your project clean your project ( Command+Shift+K ) and run

After unlink all packages it again following modules are linked manually while react-native upgrade

I have updated react-native version to latest.
So I have unlink all manually linked packages. But If i run react-native run-ios after pod install it shows the list of packages again to unlink.
error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually
When pod install it shows the below error
[!] CocoaPods could not find compatible versions for pod "react-native-webview":
In Podfile:
react-native-webview (from `../node_modules/react-native-webview`)
Specs satisfying the `react-native-webview (from `../node_modules/react-native-webview`)` dependency were found, but they required a higher minimum deployment target.
I have changed the platform ios to 9.0 in podfile. It worked for me

Attempted to register RCTBridgeModule class LRNAnimationViewManager for the name 'LottieAnimationView', but name was already registered by

I am trying to run 'lottie' for React Native however after successful XCODE build, I get an error:
Attempted to register RCTBridgeModule class LRNAnimationViewManager for the name 'LottieAnimationView', but name was already registered by...
Similar issue:
Attempted to register RCTBridgeModule class RCTFileReaderModule.
Uninstalling, unlinking and reinstalling, relinking does not seem to work. Installed the correct version of 'lottie-ios', 'lottie-react-native' associated with >RN 0.58 on:
https://github.com/react-native-community/lottie-react-native/blob/master/README.md#getting-started.
Also tried adding "Lottie.framework" in the 'embedded framework' tab of XCODE. I am trying to set up the animation screens using this package.
Any leads/suggestions welcomed and thanks in advance!
The versions of lottie-ios and lottie-react-native matter depending on the react-native version you have on your package.json.
For React Native == 0.59.x (which is used by Expo sdk 35 and 36):
Install lottie-react-native (3.0.2) and lottie-ios (3.0.3):
yarn add lottie-react-native#3.0.2
yarn add lottie-ios#3.0.3
or
npm i --save lottie-react-native#3.0.2
npm i --save lottie-ios#3.0.3
Do not use react-native link to add the library to your project, if you are using ExpoKit.
react-native link lottie-ios
react-native link lottie-react-native
Note:
Go to your ios folder and run:
pod install
If you get the error:
[!] CocoaPods could not find compatible versions for pod "lottie-ios":
In snapshot (Podfile.lock):
lottie-ios
In Podfile:
ExpoKit/Core (from `http://github.com/expo/expo.git`, tag `ios/2.13.0`) was resolved to 35.0.0, which depends on
lottie-ios (~> 2.5.0)
lottie-ios (from `../node_modules/lottie-ios`)
You would better remove the pod lottie-ios and pod lottie-react-native from your Podfile, because ExpoKit will have the dependencies sorted out when you run pod install.