apache / apache/cordova-node-xcode

[Question] How to add file to PBXNativeTarget

Open
#15 3 comments 0 reactions 0 assignees View on GitHub
info-needed support
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.