I found a project on Github that I'd like to take a stab at converting for macOS. (This is still Xcode 8, btw).
The original project is a C# project that appears to have been created with Form Designer, although I don't think the precise details are at issue (I could be wrong!).
I forked the project on github into my own account. I updated the .gitignore file to exclude any of the Xcode files that don't need versioning (using the gitignore.io for xcode).
However, there appears to be a catch-22 with creating/using an Xcode project for versioning with this fork.
If I use Xcode to create a project from the remote repository, it clones the remote locally but doesn't create an Xcode project (presumably, because the existing project is CS, not Swift/Obj-C). In fact, all it does is clone the remote, check it out, and then sit there, Xcode open, with no files open.
If I use Xcode to create a project without SCM, if I try to check out the remote (after having destroyed the directory from the earlier clone/checkout) it then clobbers the .xcproject file and all of its associated files and gives an error:
"The workspace file that was at “/Users/[redacted path & whatnot].xcodeproj/project.xcworkspace” has disappeared."
If I use Xcode to create a project with SCM, and then try to add the remote and pull from it, nothing happens. I can commit locally, but pushing to the remote gives an error message about there not being a repository for it.
Frankly, I think I understand why all of these happen. In the first case, it's not an Xcode project and has no Swift or Objective-C files, and therefore is not an Xcode-recognized code project. In the second case, pulling the remote should clobber the local, since none of the remote files exist locally and none of the local files exist remotely, and I am explicitly telling it to pull the remote repository. In the third case, even though I've added the remote as a repository (and I have the credentials to do so), there is no local copy of the remote (the local copy is of the present project, and contains none of the remote files) and therefore the local and remote don't really know about each other.
So how do I make this work? I believe that what I will probably have to do is to checkout the remote to my local machine (either in Xcode or through CLI, I think either should work the same way), then create an Xcode project in the same directory without SCM, add the files from the local repository into the project, save the project and quit Xcode. Then, I would probably have to run git from the terminal, and have it add the new Xcode files (minus, of course, the .gitignore files), then commit & push.
When that happens, will Xcode then recognize that this project is under SCM, via git? Did I miss some (to me at least) non-obvious step that would make this work from within Xcode?