Could not automatically select an Xcode project

后端 未结 21 721
灰色年华
灰色年华 2021-02-02 06:03

When i type \"pod install\" in a correct directory I always get this

Analyzing dependencies

[!] Could not automatically select an Xcode project. Specify          


        
相关标签:
21条回答
  • 2021-02-02 06:14

    Did you include the entire ALCameraViewController repository in your project folder? I did that initially, and I got the same error. Go back to the repo and follow the README.md file step by step.

    If you did include the entire repo, I would also advise to remove all the folders that you included in your project that came from the ALCameraViewController repo. Then try to install the repo in the Podfile again, the error should be gone.

    0 讨论(0)
  • 2021-02-02 06:16

    It is taking single declaration for each target. Add line at top of the file after platform:

    project '<Project>.xcodeproj'
    
    target '<Project>' do
     #bla bla bla
    end
    
    target '<Project>-tvOS' do
     #bla bla bla
    end
    
    
    0 讨论(0)
  • 2021-02-02 06:18

    This seems to be an issue with an additional file being added to Xcode. In case you are trying to troubleshoot, it makes sense to look at any additional files you may have added. Either on Xcode or directly in your file.

    In my case it was this: /node_modules/react-native-gesture-handlers/ios/RNGestureHandler

    After deleting this I hit pod install, and it worked fine.

    0 讨论(0)
  • 2021-02-02 06:18

    This happened to me too. We use git. And often change branches. While I changing a branch, some bug in Xcode made the project file lose its name. I did clean and changed branches or pull again. The Xcode project file was restored. But the old file with the missing name was still in there. This is not detected by git, if you try to do a pod update with this file in there, It will file. Delete this file or make sure you have only xcode proj file. This should fix it

    0 讨论(0)
  • 2021-02-02 06:20

    Add your Podfile to project line for Specify project path

    target 'MyGPSApp' do
      project 'FastGPS'
      ...
    end
    

    details: https://guides.cocoapods.org/syntax/podfile.html#project

    0 讨论(0)
  • 2021-02-02 06:20

    I had 2 files with .xcodeproj along with 1 .xcworkspace, inside my project folder. I deleted one and problem got resolved.

    In my case, I removed the one whose size was zero bytes.

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