Add helpers to add new pbxNativeTarget uuid to root pbxProject
diff --git a/lib/pbxProject.js b/lib/pbxProject.js
index b782995..ab06a11 100644
--- a/lib/pbxProject.js
+++ b/lib/pbxProject.js
@@ -345,6 +345,16 @@
return { uuid: pbxGroupUuid, pbxGroup: pbxGroup };
}
+pbxProject.prototype.addToPbxProjectSection = function(target) {
+
+ var newTarget = {
+ value: target.pbxNativeTarget,
+ comment: pbxNativeTargetComment(target.pbxNativeTarget)
+ };
+
+ this.pbxProjectSection()[this.getFirstProject()['uuid']]['targets'].push(newTarget);
+}
+
pbxProject.prototype.addToPbxFileReferenceSection = function(file) {
var commentKey = f("%s_comment", file.fileRef);
@@ -991,6 +1001,10 @@
return file.basename;
}
+function pbxNativeTargetComment(target) {
+ return target.name;
+}
+
function longComment(file) {
return f("%s in %s", file.basename, file.group);
}