How do I select a project in my Podfile? I'm getting the error: Unable to find the Xcode project for the target 'Pods'

I'm pretty sure you are not in the right directory. Are you sure your .xcodeproj is in the Developer folder? There might be a subfolder you need to navigate to.

The right way to enable CocoaPods in your Project is:

  1. Open Terminal and execute: $ sudo gem install cocoapods
  2. Navigate to your Project folder (I assume in your case it's cd /Users/myName/Developer/SimpleWeather/SimpleWeather.xcodeproj).
  3. Setup Cocoapod pod setup
  4. Create the Podfile touch Podfile
  5. Open the Podfile open -e Podfile and insert your code for Podfile
  6. Finally install the Podfile pod install

If you follow this instructions everything should work. When opening your project make sure to open the .xworkspacefile.

For more information, see this.


This error also occurs when you have multiple .xcodeproj in your Xcode project.

You don't need more than one .xcodeproj in general cases. Remove unnecessary .xcodeproj, and Cocoapods should get the correct path automatically afterwards.


Reiterating our original conversation:

Accordingly to Podfile Syntax Reference the Podfile looks right.

Make sure you are running $pod install from your project directory:

/Users/myName/Developer/SimpleWeather