0

I have developed an application in Xcode version 7 and now I want to run the same application in Xcode version 8.2.1.Do I need to re-install the pod files which I have included in the previous version of Xcode or is there any procedure i need to follow before running it in the new version of Xcode?

Podfile:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'test' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for test

  target 'testTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'testUITests' do
    inherit! :search_paths
    # Pods for testing
  end
 pod 'AZSClient'
  pod 'CardIO'
  pod 'Google/Analytics'
  pod 'OpenTok'
  pod 'THCalendarDatePicker', '~> 1.2.6'

end
rmaddy
  • 314,917
  • 42
  • 532
  • 579
Krishu
  • 1
  • 4
  • Show your pod file & error – Mukesh Lokare Feb 15 '17 at 04:13
  • `pod update` works for you. No need to reinstall again if you have already installed on prev. version of xcode. – Mukesh Lokare Feb 15 '17 at 04:37
  • tried still it shows same error '[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`. You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.' – Krishu Feb 15 '17 at 04:44
  • Try this.`$ rm -rf ~/.cocoapods $ mkdir -p ~/.cocoapods/repos $ cd ~/.cocoapods/repos $ git clone https://github.com/CocoaPods/Specs.git master` , taken from github issue https://github.com/CocoaPods/CocoaPods/issues/6269 – Saurabh Yadav Feb 15 '17 at 05:26

6 Answers6

0

Can you try to run 'pod install'? You should have nothing to lose to re-install the pod files.

Alex Bin Zhao
  • 398
  • 3
  • 11
  • Tried with 'pod install' but it is showing the error: '[!] Unable to add a source with url https://github.com/CocoaPods/Specs.git named master-1. You can try adding it manually in ~/.cocoapods/repos or via pod repo add' – Krishu Feb 15 '17 at 04:33
0

You can visit to https://guides.cocoapods.org/using/pod-install-vs-update.html ,

I have installed your dependancies in one demo project its work fine & build successfully,

Just run pod install if you are installing for first time & pod update if you are adding new framework or running in newer version.

enter image description here

I think you have to do this,

Go to ~/.cocoapods/repos & run git clone https://github.com/CocoaPods/Specs.git master

Or if not works both visit,

Unable to add a source with url

Community
  • 1
  • 1
Mukesh Lokare
  • 2,159
  • 26
  • 38
  • For both 'pod install' and 'pod update' am getting the same error. '[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`. You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.' – Krishu Feb 15 '17 at 04:52
0

There is no need to install the pod again. You have to do only ....

remove the -lPods-(someCocoaPod) lines in the 'Other Linker Flags' list BUT only if $(inherited) is at the top. At first I was unsure, but the reassuring sign was that I still saw references to my cocoapods when I left the edit mode(inherited). I tested in debug and release, both of which were giving me errors, and the problem was immediately resolved

Deepak Saki
  • 945
  • 1
  • 8
  • 16
0

If you have newly installed Xcode 8.2.1 then you may need to update you CocoaPods on mac using https://www.cocoanetics.com/2013/11/updating-cocoapods/

SagarS
  • 21
  • 5
  • In my case i have same issue with pods. So i have completely removed cocoaPods from my mac. Then installed latest version of pods on my mac. – SagarS Feb 15 '17 at 11:07
0

Try adding it manually in ~/.cocoapods/repos or via pod repo add..

Rohan Dave
  • 251
  • 1
  • 7
0

Thank you all, Finally resolved it by updated rvm,ruby with openssl and also upgraded git:

Pod install:

referred:

How to update Ruby Version 2.0.0 to the latest version in Mac OSX Yosemite?

rvm get stable

brew update

brew doctor

brew install openssl

rvm install ruby-2.3.3 (or whatever version)

rvm use (ruby version here) i.e. rvm use ruby-2.3.3

//rvm gemset create NAME i.e. rvm gemset create rails41 //gem install rails -v 4.1

rvm list(ruby) rvm –default use 2.3.3(Make it as default)

rvm reinstall 2.3.3 --with-openssl-dir=/usr/local/opt/openssl

sudo gem install cocoapods

pod init

change pod-file and save it(add dependencies)à edit only in sublime text

pod install

Cœur
  • 37,241
  • 25
  • 195
  • 267
Krishu
  • 1
  • 4