Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
361 views
in Technique[技术] by (71.8m points)

ios - 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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...