apache / apache/cordova-node-xcode

How to use addResourceFile

Open
#83 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
217
Forks
102
Avg merge
2d 3h
Merged PRs (30d)
6

Description

I want to add localized content, use addResourceFile, but keep prompting Cannot read property 'path' of null
![2](https://user-images.githubusercontent.com/21995889/71520174-b8c15d00-28f5-11ea-8937-6b26ba901222.png)
![1](https://user-images.githubusercontent.com/21995889/71520195-ce368700-28f5-11ea-9695-4c25f160717e.png)

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.