Could not automatically select an Xcode project

When i type "pod install" in a correct directory I always get this

Analyzing dependencies

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

    project 'path/to/Project.xcodeproj'

podfile

platform :ios, '8.0'
use_frameworks!

target 'Posting' do
pod 'ALCameraViewController'

end

I'm in the project directory where Podfile can be found.


I had an old .xcodeproj-file in my folder, so there was 2 of them. I removed the old one and it works!


Add your Podfile to project line for Specify project path

target 'MyGPSApp' do
  project 'FastGPS'
  ...
end

details: https://guides.cocoapods.org/syntax/podfile.html#project


platform :iOS, '8.0'
use_frameworks!

target 'Posting' do
project 'projectpath/project.xcodeproj'
pod 'ALCameraViewController'
end

This happened to me, I had my "podfile" in the subfolder and not the main directory, e.g., ~/MyProject/MyProject/podfile instead of ~/Myproject/podfile

Hope this helps!


Mistakenly added two .xcodeproj file in the project folder.

This is why pod did not decided which one he will work for. I simply delete the unnecessary xcodeproj file from the project.

Now Solved