Cocoa pod issue - objective-c

I have setup my library cocoa pod setup and set it on git now i am trying to install it with pod but it gives me following error
Unable to find a specification for ‘pod name’
any one have any idea about this error and why pod not install.

Check in your Podfile for the target, target should be same to your project name
Sample
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
target "Project name" do //check here "Project name" should be same to your project name
pod 'GoogleMaps'
end

Looks like you have problems setting up your Specs,Likely same issue to https://github.com/CocoaPods/CocoaPods/issues/6444
The solution is as follows, enter the following command in the terminal:
rm -rf ~/.cocoapods
pod setup
After successful execution, pod install or pod update

Related

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)

ios pod install returns "No podspec found for `FBSDKCoreKit"

I have a RN app which works on Windows. I pulled down the code to my Mac and I'm trying to run the code on my Mac. When I run pod install on my project's ios directory, the following error is output to the Terminal:
No podspec found for FBSDKCoreKit
Here is the full Terminal output:
My-MacBook-Pro:ios myname$ pod install Detected React Native module
pods for RNCAsyncStorage, RNFirebase, RNGestureHandler, RNReanimated,
RNVectorIcons, react-native-fbsdk, and react-native-safe-area-context
Analyzing dependencies Fetching podspec for DoubleConversion from
../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec
[!] No podspec found for FBSDKCoreKit in
../node_modules/react-native/Libraries/FBSDKCoreKit
What is the most likely root cause of this error and what troubleshooting steps would you recommend?
1) Make sure the path is there
../node_modules/react-native/Libraries/FBSDKCoreKit
2) Run a pod repo update and a pod install
If still not working I would try an unlink followed by a cleanup of any old links related to that library in project.pbxproj then link the library again.
Note: in some cases a pod deintegrate && pod install helped me with link errors like this.

Getting error - No Such Module 'SquarePointOfSaleSDK' on the import statement

I have followed the cocoapods instructions faithfully: Podfile is:
# Uncomment the next line to define a global platform for your project
# platform :ios '9.0'
target 'SquareTesting' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for SquareTesting
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firestore', :podspec => 'https://storage.googleapis.com/firebase-preview-drop/ios/firestore/0.7.0/Firestore.podspec.json'
pod 'SquarePointOfSaleSDK'
end
I performed pod update and pod install --repo-update also, and the message: Using SquarePointOfSaleSDK (3.3.1) appeared in the verbiage.
The "SquarePointOfSaleSDK" pod appears in the list of installed pods in the file navigator.
Any suggestions would be much appreciated!
After struggling one whole day, I gave up and use
#import <SquarePointOfSaleSDK.h>
instead of
#import SquarePointOfSaleSDK;
It works, however I want to know what is the best way to fix this issue.

XCode 9.1 Command /bin/sh failed with exit code 1

After updating xcode to version 9.1, I can't compile my projects, always have the same error Command /bin/sh failed with exit code 1. I tried to create empty project, install all pods I need, and the result is the same. Here is my podfile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target 'xcode9.1' do
pod 'RMStore'
pod 'GoogleMaps'
pod 'RMMapper'
pod 'FacebookCore'
pod 'FacebookLogin'
pod 'FacebookShare'
pod 'VK-ios-sdk'
pod 'TwitterKit'
pod 'GoogleSignIn'
pod 'Flurry-iOS-SDK/FlurrySDK'
pod 'TWSReleaseNotesView'
pod 'GoogleAnalytics'
pod 'GoogleTagManager','~> 3.15.0'
pod 'SBJson'
pod 'Fabric'
pod 'Crashlytics'
pod 'APOfflineReverseGeocoding'
pod 'AFNetworking'
pod 'Realm'
end
This problem repeats in all my projects, can anybody explain me how to fix it?
Here is the screen of full error
The solution is very simple. In your pods target, Build settings, I changed valid architectures list. Also Build architectures only flag change to No can resolve the problem.

React Native and pod installation failure

I'm trying to install the libary ( pusher ) onto IOS that is made with react-native language.
The command I used was
pod 'libPusher', git: 'https://github.com/pusher/libPusher.git', branch: 'push-notifications
The error that I got was
[!] Unknown command: `libPusher,`
Did you mean: list?
Usage:
$ pod COMMAND
CocoaPods, the Cocoa library package manager.
...
I have no idea why this pod installation doesn't work. Pod version is 1.0.1.
(pod --version)
Please share any idea with me!
Not sure if you ever figured this out, but the line Pusher gives you isn't for the command line. Add it to your Podfile:
target 'MyApp' do
pod 'libPusher', git: 'https://github.com/pusher/libPusher.git', branch: 'push-notifications'
end
Then run pod install to install it
Try adding -lc++ to your Tests Other Linker Flags