How to use addResourceFile
Opened this issue · 1 comments
RDPCoder commented
I want to add localized content, use addResourceFile, but keep prompting Cannot read property 'path' of null
Code:
var languageResourceFile = myProj.addResourceFile("InfoPlist.strings");
if (languageResourceFile){
myProj.addToPbxResourcesBuildPhase(languageResourceFile);
myProj.addToPbxBuildFileSection(languageResourceFile);
fs.writeFileSync(projectPbxprojNamePath, myProj.writeSync());
}
Joshuabaker2 commented
For others who run into this issue, the trick is to have a Resources
folder in your project.