In the series, I will build a simple Hacker News reader for iOS using Firebase, SwiftUI and GitHub Copilot X. In part 5, I use GitHub Copilot X to tackle the following:
- How to use Copilot, VSCode and Xcode together
- Create new GitHub repo
- Create new Xcode iOS app project
- Commit new project to repo using VSCode terminal
1. Xcode + VSCode & GitHub Copilot
Currently, Xcode does not have native support for GitHub Copilot. While there is an open source extension called CopilotForXcode, I was uncomfortable adding it my system and giving it the necessary security exception. Also, when I took a look at it, the UX felt cumbersome.
As such, I decided to leverage 2 IDEs, Xcode and VSCode. Now, admittedly, that’s not a great UX either but I actually found it fairly straight forward. Part that is that due to how I setup my computer using the yabai window manager (check out this great tutorial from Josean Martinez on his YouTube and blog) which makes it very simple, via shortcut keys, to flip through virtual desktops. I then leverage XCode to:
- create projects
- add new files
- compile and run the app in a simulator
and then VSCode for everything else. If you watch this full tutorial, you’ll get a feel for how that works and if it’s a good setup for you. The big advantage with regards to Copilot is that there is a very actively maintained extension by GitHub that is tightly integrated into the IDE, including the GitHub Copilot Chat feature. This capability adds significant value by allowing you to highlight code and then ask questions, get an explanation of the code and even refactor it for efficiency or bug fixes.
2. GitHub Copilot X thoughts - part 5
We didn’t leverage GitHub Copilot in this session but as a new user to VSCode, I found it to be pretty straightforward. In the past, I’ve avoided VSCode as I prefer staying on the command line and in the terminal so vim/neovim is my preferred IDE. Historically I found VSCode to be too busy but after using it a bit, I was able to ignore most of the distractions.
In the next video, I setup a GitHub Flow setup for this project.