For my project I write code in a text editor (Sublime), build from the command line, and debug from Xcode like Casey does with VisualStudio on Windows.
So my setup is:
1) Bash file to build executable and create app bundle:
clang [...] -c
my_game.mm
clang [...] -o my_game my_game.o
mkdir -p MyGame.app/Contents/MacOS
mkdir -p MyGame.app/Contents/Resources
cp my_game MyGame.app/Contents/MacOS/MyGame
cp my_assets/my_icon.icns MyGame.app/Contents/Resources/icon.icns
cp my_assets/my_info.plist MyGame.app/Contents/Info.plist
2) Dummy Xcode project to debug executable
To do that:
- Create a new OSX Xcode project
- Delete the existing target
- Create a new "External Build System" target
- Give it an empty bash file to build
- Edit the scheme
- In the Run options give it the path to the executable to debug.
You can can also point Xcode to your code directory if you want to browse your files.
You can do the same thing with iOS.