I am working on an existing ReactNative project to add new features to the IOS app. But I tried to build and run the IOS app using "react-native run-ios" command, I am getting the following error.
Could not find "Podfile.lock" at null.lock. Did you run "pod install" in iOS directory?
To resolve the problem, first I run the following command in the ios folder of the project.
pod install
When I do that, I am getting the following error in the console.
[!] No `Podfile' found in the project directory.
To solve that error, I tried doing the following:
- I run "sudo gem install cocoapods"
- Then in the ios folder I run "pod init"
- Then I run "pod install" within the ios folder
Then I got the following error:
[!] The target `xxxxxx xxxTests` is declared multiple times.
I removed the repeating one in the Podfile and tried running pod install again. This time it run but I am getting the following warning.
[!] The Podfile does not contain any dependencies.
[!] Automatically assigning platform `iOS` with version `12.0` on target `Inventory Smart` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
[!] Automatically assigning platform `tvOS` with version `12.0` on target `Inventory Smart-tvOS` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
When I run react-native run-ios, I am getting the following error.
error Could not find "Podfile.lock" at null.lock. Did you run "pod install" in iOS directory?
How can I solve the issue?