Cocoapods, fail to use pod setup and pod install - ios

I have problem in setting up Cocoapods using command pod setup, with an error say SSLRead() fail. I have found a workaround in downloading the Specs of Cocoapods manually. However, when I need to install the library using command pod install in my project directory, problems regarding to SSL remains. The returns are as below:
Downloading dependencies
Installing AFNetworking (2.2.1)
[!] Error installing AFNetworking
[!] /usr/bin/git clone https://github.com/AFNetworking/AFNetworking.git/Users/DavisChung/Documents/Programming/Xcode\ Projects/TapBit/Pods/AFNetworking --single-branch --depth 1 --branch 2.2.1
Cloning into '/Users/DavisChung/Documents/Programming/Xcode Projects/TapBit/Pods/AFNetworking'...
fatal: unable to access 'https://github.com/AFNetworking/AFNetworking.git/': Server aborted the SSL handshake
One for all, how can I resolve the problems regarding to SSL?
My mac OS version is Yosemite 10.10.2
Thanks

After having the same issue, I have realized that my network provider decides to randomly check if I am human. There might be another solution, but when running from terminal, There is no additional way to response. Therefore, the network provider is that one that might cause the issue.
To that my solution was to change network, then re-run pod install. The pods did updated once I did.

it seems that your network working under proxy.For this case you need download project from github point this directory inside the podfile
pod 'MyPod', :local => "/Path/To/Pod"

Related

Problem with Cocoapods, showing error 'Couldn't determine repo type for URL' when installing pods

I used Cocoapods a lot, but recently whenever I was updating the pods (pod update), it started duplicating files and often didn't let me create a build for the App Store.
I updated Cocoapods to the last version possible but still didn't solve that. Then I tried to remove and re-install it.
Now is occurring another issue. When I try to run pod install on any project, pods are not getting installed like previously, but is showing this error:
myUser$ pod install
Analyzing dependencies
[!] Couldn't determine repo type for URL: `https://github.com/CocoaPods/Specs.git`: Permission bits for '/Users/myUser/.netrc' should be 0600, but are 644
Previously, this never happened, but now it's happening even on projects that Cocoapods worked like a charm. What could be the problem?
Thank you in advance.
The error message says there's a permission issue:
Permission bits for '/Users/myUser/.netrc' should be 0600, but are 644
So in order to fix the permission, you should do this:
chmod 600 ~/.netrc
Then try to run pod install again. If the root cause was really this permissions issue then everything should work.
In addition to 0xced's answer: Check and fix possible syntax errors in ~/.netrc .

Multiple dependencies error during build on iOS

I'm trying to build my nativescript app on iOS.
I have brand new MacMini with fresh system and all stuff like xcode, etc.
My app builds without any warnings on android - not checked android build on Mac.
When i try to run my app on emulator i have an error saying:
Analyzing dependencies
[!] There are multiple dependencies with different sources for `Socket.IO-Client-Swift` in `Podfile`:
- Socket.IO-Client-Swift (from `https://github.com/triniwiz/socket.io-client-swift.git`)
- Socket.IO-Client-Swift (~> 12.1.3)
'pod install' command failed.
Tried to remove one of the dependency from pod file but without any luck - it brings back during build.
What should i do?
After updating my dependencies, I also ran into an issue with Cocopods, although, not exactly the same. In my case, running pod repo update from within platforms/ios solved my problem. In short, there had been updates that my local pod spec repo wasn't aware of and it was getting "confused". I'm not sure if this will ultimately solve your specific problem, but it's fairly quick to do and, at least, won't hurt anything.
Good luck!

Which cocoapods version to use on Mac 10.12, If Restkit is the dependency

I was using 0.37.2 pod version on previous mac version. Its not working on Sierra. If i upgrade the pods, Restkit creates an issue for File not found. Tried all the possible answers to make Restkit work on new pod version but no success. If someone else got the same issue, what is the fix?
[!] Unable to load a specification for the plugin /Users/q/.rvm/gems/ruby-2.0.0-p648/gems/cocoapods-deintegrate-1.0.1
Analyzing dependencies
[!] The master repo requires CocoaPods 1.0.0 - (currently using 0.37.2)
Update CocoaPods, or checkout the appropriate tag in the repo.
http://blog.cocoapods.org/Sharding/
using old specs worked.
For people who want to continue using 0.x versions, we will be
replicating the Specs repo from the commit before the repo was
sharded. This means you can add:
source "https://github.com/CocoaPods/Old-Specs"
To the top of your Podfile, and CocoaPods will only use the archived
repo, instead of using the new repo structure. You will also need to
set your local Specs repo to a version before the transition:
cd ~/.cocoapods/repos/master/ git fetch origin master git checkout
v0.32.1

on mac os sierra, stuck on "Setting up CocoaPods master repo"

After moving to mac os sierra, I completely formatted my mac now I'm facing problem to install cocoapods, every time I run sudo gem install cocoapods --pre
every thing installed well, and when I try to install a pod, the terminal stack on Setting up CocoaPods master repo
.
Already updated the system with sudo gem update --system and still got the same problem, searched online to found old answers to use pod install --verbose
Ss I found in THIS answer fail again tells to install it manually.
NOTE : I have the latest version of 'Command Line Tools'. Any suggestion or how to install master repo manually?
From https://stackoverflow.com/a/21852985/1033581:
on 4th Nov 2016, the repo is 1.07 GB
From https://stackoverflow.com/a/33699136/1033581:
To get a progression, you can clone master yourself:
pod repo remove master
git clone https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master
pod setup
In my first installation, I got the same problem too, it takes too much time in "setting up master repo".
Actually, you can see it through "activity monitor" that it's actually downloading, but it seems the connection is slow from the server.
Try these steps, it solves my problem:
1. pod setup
It will do "setting up master" again, don't wait, continue these steps below:
2. Ctrl +C
3. pod repo remove master
4. cd ~/.cocoapods/repos
5. git clone --depth 1 https://github.com/CocoaPods/Specs.git master
It takes less than 7 minutes for me (I think it depends on internet connection), then I can do pod install.

Cocoapods error during pod update

I've been using Cocoapods without any problems on my projects for a while now, but today I suddenly got this error while trying to update my pods on a particular project:
[!] Pod::Executable pull
Your configuration specifies to merge with the ref 'master'
from the remote, but no such ref was fetched.
I have been trying to work out what is causing this issue but to no avail (it happens on all projects that use Cocoapods during the "Analyzing dependencies" stage).
Does anyone know what's causing this (and how to resolve it)?
This looks like an issue with the git repository that all of CocoaPod's specs come from. It lives in ~/.cocoapods. To fix issues like this the easiest way is to just delete it entirely with rm -rf ~/.cocoapods and set it up again with pod setup
EDIT:
Today (1/30/14) there was an issue with the specs repo that may make you want to fix this. Read more about it on the CocoaPods Blog

Resources