How to generate XCode project on Mac with node-gyp

macos, node-gyp, node.js, xcode

Solution

Just solved it myself after placing the bounty... :)

`node-gyp configure -- -f xcode`

was the answer to this question.

Problem

I'm using the node-gyp to build the node.js add-on. The contents of the binding.gyp file is ``` { 'targets': [ { 'target_name': 'myapp', 'include_dirs': ['api-sdk'], 'sources': [ 'main.cpp', 'lib.cpp'], 'cflags!': [ '-fno-exceptions' ], 'cflags_cc!': [ '-fno-exceptions' ], 'conditions': [ ['OS=="mac"', { 'xcode_settings': { 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES' } }] ] } ] } ``` On Windows, when I run `node-gyp configure`, the Visual Studio project is generated automatically. But on Mac, it doesn't generate the correspnding XCode project after executing `node-gyp configure`. Does anybody know how to generate the XCode project with Node-gyp? Should I add some settings to the binding.gyp file? Thanks, Jeffrey

Original source