Unable to find a specification in CocoaPods

后端 未结 17 2440
醉酒成梦
醉酒成梦 2020-12-07 15:31

I cannot understand why the Cocoapod is unable to find the pod specification I created when I run pod install. Could someone help me solve this trouble?

相关标签:
17条回答
  • 2020-12-07 15:51

    I solved my problem with below command:

    cocoa pod update

    To update use this command

    sudo gem install cocoapods

    if above command gives error than use this one

    sudo gem install -n /usr/local/bin cocoapods

    and than do this

    pod repo update

    0 讨论(0)
  • 2020-12-07 15:53

    You first need to add your Podspec to a private specs repo; this lets CocoaPods find the pod when you try to install it.

    Enter the following in Terminal, making sure you’re still in the framework directory you are trying to add:

    pod repo add [your framework name] [Your framework Git URL]
    pod repo push [your framework name] [your framework .podspec file name]
    
    0 讨论(0)
  • 2020-12-07 15:55

    For me, the below worked well but first try could be direct "pod setup" command If that don't work then go for the below commands would definitely make things happen.

    pod repo remove master
    pod setup
    pod install

    0 讨论(0)
  • 2020-12-07 15:56

    I missed adding , causing issue.

    Replacing,

    pod 'PodName' '~> 2.3'
    

    With,

    pod 'PodName', '~> 2.3'
    

    Did the job.

    0 讨论(0)
  • 2020-12-07 15:56

    had the same problem.

    what really worked for me was gem uninstall cocoapods (as mentioned above by https://stackoverflow.com/users/4264880/seema-sharma) where I found that I had 11 (!) different cocoapods versions installed.

    I chose to uninstall all and then gem install cocoapods:1.4.0

    All good now.

    0 讨论(0)
  • 2020-12-07 16:00

    Make sure you added

    source 'https://github.com/CocoaPods/Specs.git'
    

    at the very beginning of your Podfile

    0 讨论(0)
提交回复
热议问题