Is there's a way to generate a xcode project which will use ninja to compile?

Xcode is its own build system. The xcode generator will always use xcodebuild to drive the build.