- Published on
Quickly Open Your Xcode Project In Terminal
- Authors

- Name
- Kiet
Have you ever tried to open an Xcode project from the terminal, like how VSCode does with code .?
When working with Flutter or React Native projects, I often need to open the iOS module to do something in Xcode. (I use Neovim, btw)
As you may already know, if your Xcode project uses CocoaPods, you need to open it using the .xcworkspace file. Otherwise, you’ll need to open the .xcodeproj file.
In this case, we have to determine which file to open and then use the open command accordingly, like this:
open ios/.xcworkspace
or:
open ios/.xcodeproj
Feeling cumbersome? If you’re working on multiple projects that use both SPM and CocoaPods, like I do, you’ll spend a few seconds thinking about which project you’re currently working on, and then which command to use…
Luckily, there’s a command that will automatically detect the correct project file and open it for us, regardless of whether our project uses CocoaPods or SPM.
xed ios
Although it is just a simple command, it save me a lot of times. Hope you too!