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:
- Open Terminal and execute:
$ sudo gem install cocoapods
- Navigate to your Project folder (I assume in your case it's
cd /Users/myName/Developer/SimpleWeather/SimpleWeather.xcodeproj
). - Setup Cocoapod
pod setup
- Create the Podfile
touch Podfile
- Open the Podfile
open -e Podfile
and insert your code for Podfile - Finally install the Podfile
pod install
If you follow this instructions everything should work. When opening your project make sure to open the .xworkspace
file.
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