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

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.

Related

React-native-Navigation-Stack Version && dependency error

can somebody help me with the navigation stack dependency error Ipackage.json file am very new to react tried so many dependencies but still getting the attached error
Terminal error
I am attaching your recommended changes changes I made..
then when Ithe error tried installing the masked-view it showed me this
You have to install the necessary libraries required for react-navigation below are the mentioned npm library you need to install
Install all the red marked libraries and also do cd ios pod install and you are good to go.
You only have to install the following libraries
npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context #react-native-community/masked-view
for navigation.
Remove react-navigation/core , react-navigation/router library which you have added extra.

Uninstall package linked in cocoa pods for react native 0.63

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.

How to run pod file in iOS directory in react native?

error Could not find "Podfile.lock" at projects\reactNative\ios\Podfile.lock. Did you run "pod install" in iOS directory?
(node:11696) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
error Could not get the simulator list from Xcode. Please open Xcode and try running project directly from there to resolve the remaining issues. Run CLI with --verbose flag
Issue 1
For fixing the issue:
Could not find "Podfile.lock" at projects\reactNative\ios\Podfile.lock. Did you run "pod install" in iOS directory?
Please make sure you have install cocoapods and run this command at your project root:
gem install cocoapods // If you haven't install cocoapods
cd ios && pod install && cd ..
Issue 2
For fixing the issue:
(node:11696) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created)
Please downgrade your node.js version to v13.x.x, one of the solutions below:
npm install -g n
sudo n 13.13.0
Issue 3
For fixing the issue:
Could not get the simulator list from Xcode. Please open Xcode and try running project directly from there to resolve the remaining issues. Run CLI with --verbose flag
Please make sure you have installed Xcode correctly from App Store and use the latest React Native version in your project (should be v0.62.2 now for stable). If still cannot open the project, please try to add some simulator in Xcode's developer settings.
Cheers!
you did not install cocoapods
install cocoapods commands
sudo gem install cocoapods
after that in react native directory
cd ios && pod install && cd ../ && react-native run-ios
CocoaPods manages library dependencies for your Xcode projects. We need it to setup the iOS project. Like yarn
sudo gem install cocoapods
The Podfile is a specification that describes the dependencies of the targets of one or more Xcode projects. Like package.json
access to the folder with Podfile, run
pod install
This will resolve the code of those dependency framework, and generate Pods.xcodeproj for your iOS project.

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