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

前端 未结 10 1280
独厮守ぢ
独厮守ぢ 2020-12-02 13:27

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:

platfo         


        
相关标签:
10条回答
  • 2020-12-02 13:54

    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.

    0 讨论(0)
  • 2020-12-02 13:55

    Hey your path for the project might be wrong. Go to the project and right click on SimpleWeather.xcodeproj and select Get Info as show in the image below(The right side window is for Get Info here). Copy this path from the details window and paste it into the Podfile. After that append /SimpleWeather.xcodeproj to that pasted path. This might solve the problem(Note: It is a snap shot for my project). In your case the solution might be replacing the path with this /Users/myName/Developer/SimpleWeather/SimpleWeather.xcodeproj

    enter image description here

    0 讨论(0)
  • 2020-12-02 14:00

    You installed your Xcode..in application use this command to execute

    sudo xcode-select -switch /Applications/Xcode.app
    
    0 讨论(0)
  • 2020-12-02 14:01

    Maybe you have two project .xcodeproj, remove one.

    Remove Podfile.lock, folder Pods. On Terminal cd /Users/myName/Developer/SimpleWeather and pod install

    0 讨论(0)
提交回复
热议问题