For a long time I always used the open
command to open the Xcode project file contained inside React Native Projects.
bramus in ~/repos/projects/react-native/example
$ open ios/Example.xcodeproj
It wasn’t until I recently started a new React Native project that react-native init
afterwards informed me to use xed
instead.
The
xed
tool launches the Xcode application and opens the given documents, or opens a new untitled document, optionally with the contents of standard in.
With xed
you don’t need to know the name of the project file. Just pass in the ios
folder as an argument and it will handle things for you:
bramus in ~/repos/projects/react-native/example
$ xed ios
💁♂️ xed
handles both workspaces (.xcworkspace
) and regular project files (.xcodeproj
) so no worries there 🙂
Furthermore, if you don’t want to remember yet another extra command, you can always add it as a script to your package.json
:
{
…
"scripts": {
…
"xcode": "xed ios"
},
…
}
Thank me with a coffee.
I don\'t do this for profit but a small one-time donation would surely put a smile on my face. Thanks!
To stay in the loop you can follow @bramus or follow @bramusblog on Twitter.