Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 doing the Ray Wenderlich tutorial called SimpleWeather.
The podfile is in the same folder as the project. Here's my code from the podfile:

platform :ios, '7.0'  xcodeproj 'SimpleWeather'    pod 'Mantle'   pod 'LBBlurredImage'   pod 'TSMessages'   pod 'ReactiveCocoa'   

The error message is this: [!] Unable to find the Xcode project /Users/myName/Developer/SimpleWeather.xcodeproj for the target Pods.

The name of the project is SimpleWeather.

like image 858
meghan66 Avatar asked Jan 12 '14 03:01

meghan66


People also ask

Where is Podfile in Xcode project?

You can manually create a Podfile with a text editor or execute the pod init command at the root of your Xcode project. This command creates a Podfile at the root of your Xcode project. Open the file in your favorite text editor.


1 Answers

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.

like image 188
fahu Avatar answered Sep 27 '22 21:09

fahu