Open wajahatch888 opened 7 years ago
try first to parse, e.g.
var xcodeProject = xcode.project(projectPath);
xcodeProject.parseSync();
var buildPhase = xcodeProject.addBuildPhase(...
@hypery2k apologies for the slow reply. You need to specify a group to add the header to otherwise it your header is added to a group named "Plugins" which you probably don't have in your project?
myProj.addHeader(path, opt, group)
I am using following code to read xcode project and add one header file But it fails.
I am getting following error
TypeError: Cannot read property 'path' of null at correctForPath (/Users/Wajahat/Desktop/electron-quick-start-master/node_modules/xcode/lib/pbxProject.js:1586:38) at correctForPluginsPath (/Users/Wajahat/Desktop/electron-quick-start-master/node_modules/xcode/lib/pbxProject.js:1572:12) at pbxProject.addPluginFile (/Users/Wajahat/Desktop/electron-quick-start-master/node_modules/xcode/lib/pbxProject.js:89:5) at pbxProject.addHeaderFile (/Users/Wajahat/Desktop/electron-quick-start-master/node_modules/xcode/lib/pbxProject.js:197:21) at pbxProject. (/Users/Wajahat/Desktop/electron-quick-start-master/xcodetest.js:9:12)
at emitTwo (events.js:106:13)
at pbxProject.emit (events.js:191:7)
at pbxProject. (/Users/Wajahat/Desktop/electron-quick-start-master/node_modules/xcode/lib/pbxProject.js:31:18)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
Can anybody tell what i am doing wrong? Thanks in advance.