Add helper: productTypeForTargettype()
diff --git a/lib/pbxProject.js b/lib/pbxProject.js
index d6cb5f3..ebc7715 100644
--- a/lib/pbxProject.js
+++ b/lib/pbxProject.js
@@ -1165,6 +1165,24 @@
if (str) return str.replace(/^"(.*)"$/, "$1");
}
+function producttypeForTargettype (targetType) {
+
+ PRODUCTTYPE_BY_TARGETTYPE = {
+ application: 'com.apple.product-type.application',
+ app_extension: 'com.apple.product-type.app-extension',
+ bundle: 'com.apple.product-type.bundle',
+ command_line_tool: 'com.apple.product-type.tool',
+ dynamic_library: 'com.apple.product-type.library.dynamic',
+ framework: 'com.apple.product-type.framework',
+ static_library: 'com.apple.product-type.library.static',
+ unit_test_bundle: 'com.apple.product-type.bundle.unit-test',
+ watch_app: 'com.apple.product-type.application.watchapp',
+ watch_extension: 'com.apple.product-type.watchkit-extension'
+ };
+
+ return PRODUCTTYPE_BY_TARGETTYPE[targetType]
+}
+
pbxProject.prototype.getFirstProject = function() {
// Get pbxProject container