Search code examples
xcodegithubclonegithub-for-mac

Clone repo from github to xcode issues


I have tried following a few tutorials on cloning a github repo and opening it up on xcode. I first connected my github account to xcode and then I selected a project to clone. I then placed it into my folder where all my projects are stored. Then I went to xcode to open an existing project but when I try to select the project I cloned I get this message:

Could not open file. (/Users/username/Documents/Dev/Linked-Lists)

I am not sure what the issue is. Here is the url I am trying to clone: https://github.com/wwolfgang11/Linked-Lists

From what I found online, once I clone an existing repository and save it either my desktop or some folder, then Xcode should automatically open up the project. In my case that does not happen and I have no idea why.


Solution

  • SmileyCreations identified the problem (the repo doesn't have an Xcode project), so here's how to solve it:

    1) Create a new "macOS" project and set it to be a command line tool: 1 create new project 2) Choose the C++ language. 2 choose the C++ language 3) Drag in the .cpp and .h files from the repo: 3 drag in source files