in lib/pbxProject.js [241:284]
pbxProject.prototype.addResourceFile = function(path, opt, group) {
opt = opt || {};
var file;
if (opt.plugin) {
file = this.addPluginFile(path, opt);
if (!file) return false;
} else {
file = new pbxFile(path, opt);
if (this.hasFile(file.path)) return false;
}
file.uuid = this.generateUuid();
file.target = opt ? opt.target : undefined;
if (!opt.plugin) {
correctForResourcesPath(file, this);
file.fileRef = this.generateUuid();
}
if (!opt.variantGroup) {
this.addToPbxBuildFileSection(file); // PBXBuildFile
this.addToPbxResourcesBuildPhase(file); // PBXResourcesBuildPhase
}
if (!opt.plugin) {
this.addToPbxFileReferenceSection(file); // PBXFileReference
if (group) {
if (this.getPBXGroupByKey(group)) {
this.addToPbxGroup(file, group); //Group other than Resources (i.e. 'splash')
}
else if (this.getPBXVariantGroupByKey(group)) {
this.addToPbxVariantGroup(file, group); // PBXVariantGroup
}
}
else {
this.addToResourcesPbxGroup(file); // PBXGroup
}
}
return file;
}