cordova-node-xcode icon indicating copy to clipboard operation
cordova-node-xcode copied to clipboard

How to use addResourceFile

Open RDPCoder opened this issue 5 years ago • 1 comments

I want to add localized content, use addResourceFile, but keep prompting Cannot read property 'path' of null 2 1

Code: var languageResourceFile = myProj.addResourceFile("InfoPlist.strings"); if (languageResourceFile){ myProj.addToPbxResourcesBuildPhase(languageResourceFile); myProj.addToPbxBuildFileSection(languageResourceFile); fs.writeFileSync(projectPbxprojNamePath, myProj.writeSync()); }

RDPCoder avatar Dec 27 '19 14:12 RDPCoder

For others who run into this issue, the trick is to have a Resources folder in your project.

Joshuabaker2 avatar Jun 23 '20 22:06 Joshuabaker2