Search code examples
xcodecocoapodspodfile

I can't find podfile


I use terminal create podfile:

$ cd /Users/user_name/Desktop/CocoaPodsTest
$ touch Podfile

but i can't find podfile in finder ,but i can use 'vim podfile' to edit it. and when i install podfile , it shows this information:

[!] Could not automatically select an Xcode project. Specify one in your Podfile like so:

project 'path/to/Project.xcodeproj'

when i restart my mac , if i install pod,it show this pod has not exists!

it happens from i update xcode version to 8.0.


Solution

  • Use command pod init to create a podfile.

    $ pod init
    

    Tip: CocoaPods provides a pod init command to create a Podfile with smart defaults. You should use it.