Xcode
Xcode is a free macOS-only IDE. You can download it from the Mac App Store.
Importing the project
- Other > External Build System template.
- Targets section and select the Info tab.
- Fill out the form with the following settings:
- File > New > Target….
- OS X > Application > Command Line Tool.
Note
GodotXcodeIndex). - Build Settings tab and look for Header Search Paths.
- Header Search Paths to the absolute path to the Godot root folder. You need to include subdirectories as well. To achieve that, add two two asterisks (
**) to the end of the path, e.g./Users/me/repos/godot-source/**. - Add the Godot source to the project by dragging and dropping it into the project file browser.
- Create external build system project.
- Create groups for the Added folders option and check only your command line indexing target in the Add to targets section.
- Xcode will now index the files. This may take a few minutes.
- Once Xcode is done indexing, you should have jump-to-definition, autocompletion, and full syntax highlighting.
Debugging the project
To enable debugging support you need to edit the external build target’s build and run schemes. - Open the scheme editor of the external build target.
- Build > Post Actions section.
- Add a new script run action
- Provide build settings from select your project. This allows to reference the project directory within the script.
- Create a script that will give the binary a name that Xcode can recognize, e.g.:
ln -f ${PROJECT_DIR}/godot/bin/godot.osx.tools.64 ${PROJECT_DIR}/godot/bin/godot
- Build the external build target.
- Run.
- Executable to the file you linked in your post-build action script.
- Debug executable.
- Arguments tab: the
-eflag opens the editor instead of the project manager, and the--pathargument tells the executable to open the specified project (must be provided as an absolute path to the project root, not theproject.godotfile).platform/osx/godot_main_osx.mmand run the project. Godot’s community channels.
