Unable to add a source with url

后端 未结 12 1240
庸人自扰
庸人自扰 2021-02-04 01:19

[!] Unable to add a source with url git@github.com:CocoaPods/Specs.git named master-1. You can try adding it manually in ~/.cocoapods/repos

12条回答
  •  闹比i
    闹比i (楼主)
    2021-02-04 01:52

    When you get above error it means, you didn't do the pod setup

    instructions:

    1. First install the cocoapods in you Mac if it is not already installed. Use terminal.

      Xcode 7 + 8

      sudo gem install cocoapods --pre

      Xcode 7

      sudo gem install activesupport -v 4.2.6 sudo gem install cocoapods

    2. Set up the pod using command pod setup

    after doing these initial set up you are ready to make your project as work space project. You can follow these commands using terminal

    1. Goto Project location folder : ~/Destop/SampleProject
    2. Create pod file : pod init
    3. List down your cocoa pods init it :

      # Uncomment the next line to define a global platform for your project
      #platform :ios, '9.0'
      
      target 'SampleProject' do
      # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
      use_frameworks!
      
      # Pods for SampleProject
      pod 'SlideMenuControllerSwift'
      
      
      target 'SampleProjectTests' do
       inherit! :search_paths
      # Pods for testing
      end
      
      target 'SampleProjectUITests' do
       inherit! :search_paths
       # Pods for testing
      end
      

      end

    it will help you.

    or else

    After installation of cocoapods than you can download the cocoa master repo manually into Mac.

        $ cd /Users/username/.cocoapods/repos 
        $ git clone https://github.com/CocoaPods/Specs.git master
    

提交回复
热议问题