apache / apache/cordova-node-xcode
[Question] How to add file to PBXNativeTarget
- Dominant language
- JavaScript
- Stars
- 217
- Forks
- 102
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 6
Description
I'm trying to add a file (GoogleServices-Info.plist) to my main project folder, but can't figure out what function to use. I've tried every one, and the best I can do is get it into my Plugins folder. Anyone know?
I thought these might work, but they didn't:
```javascript
project.addToPbxGroupType(file, targetKey, 'PBXNativeTarget');
project.addToPbxFileReferenceSection(file);
// this one gives an error; sources is undefined
project.addToPbxCopyfilesBuildPhase(file);
```
Contributor guide
Research direction
Start by reviewing the project's APIs for PBX groups, file references, and copy-files build phases, then reproduce the reported behavior with GoogleServices-Info.plist and a PBXNativeTarget. The issue is complete when the correct target and project folder contain the file without the reported error, with a focused test or documented usage demonstrating it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, javascript, nodejs
- Domain
- mobile, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100