Pod file not being initialized?

筅森魡賤 提交于 2019-11-30 04:50:54
Guohua Cheng

I encounter the same problem and solve it by using the following command:

sudo xcode-select --switch /Applications/Xcode.app 

As the error message in terminal shows, something with my git goes wrong. And, it has to do with the command line tool.

I was having an issue while trying to install packages using cocoapods. I have tried "sudo xcode-select --switch /Applications/Xcode.app" still getting wrong path error

To fix this

I opened Xcode.

Preferences
Locations
Selected the Command Lin Tools: Xcode 9.0

Now when installing packages with cocoapods I no longer get errors.

You need to set command line tool version, in Xcode:

You can download latest command line tool from Apple Download Portal, if you have paid apple developer account/id.


Here are current beta and stable Xcode Tool and supporting command line tool download link. (Ensure you'are logged in using premium developer account on Apple Developer Account to access these links)

Xcode 10

Xcode 9

Once you've latest command line tool installed in your system, set it from Xcode Menu.

(Xcode Menu Items) Xcode ▶ Preferences ▶ Location ▶ Command Line Tool ▶ Select appropriate command line tool

If you have upgraded your MAC from the App Store, then you need to run: xcode-select --install

When I ran git --version before running the command above, it didn't find git at all. It displayed this error: missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun. So, I'm guessing when I upgraded my machine somehow I lost git. Regardless, running the above command worked.

I then ran git --version and it showed the git version that was installed.

Reference: http://tips.tutorialhorizon.com/2015/10/01/xcrun-error-invalid-active-developer-path-library-developer-commandline-tools-missing-xcrun/

After installing OS Mojave and installed new Xcode tools i just had to check again the tools in:

Xcode > Preferences > Locations > Command Line tools = Xcode 10.0

Waaheeda

Hey this might help you!!! I followed this link

https://stackoverflow.com/a/16664135/7905401

After installing command line tools i closed it and opened terminal again now when i checked version git --version it gave me update version 2.10.0 then i ran other commands for cocoapod!! its working!!!!!!!!! yeeeii!!!!

Waaheeda

I followed this

After installing command line tools, I closed it and opened terminal again. Now when I checked version git --version, it gave me update version 2.10.0 then I ran other commands for cocoapod.

Now it is working.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!