Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#
-->

# cordova-node-xcode
# nativescript-dev-xcode

<!--
[![NPM](https://nodei.co/npm/nativescript-dev-xcode.png?compact=true)](https://nodei.co/npm/xcode/)
Expand Down
8 changes: 7 additions & 1 deletion lib/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ var FILETYPE_BY_EXTENSION = {
xcodeproj: 'wrapper.pb-project',
xctest: 'wrapper.cfbundle',
xib: 'file.xib',
strings: 'text.plist.strings'
strings: 'text.plist.strings',
modulemap: 'sourcecode.module-map'
},
GROUP_BY_FILETYPE = {
'archive.ar': 'Frameworks',
Expand Down Expand Up @@ -111,6 +112,10 @@ function unquoted(text) {
return text == null ? '' : text.replace (/(^")|("$)/g, '')
}

function isModuleMapFileType(fileType) {
return fileType === FILETYPE_BY_EXTENSION.modulemap;
}

module.exports = {
DEFAULT_SOURCETREE,
DEFAULT_PRODUCT_SOURCETREE,
Expand All @@ -131,5 +136,6 @@ module.exports = {
isResource,
isEntitlementFileType,
isPlistFileType,
isModuleMapFileType,
unquoted
}
5 changes: 3 additions & 2 deletions lib/pbxProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ var util = require('util'),
isResource = constants.isResource,
isEntitlementFileType = constants.isEntitlementFileType,
isAssetFileType = constants.isAssetFileType,
isPlistFileType = constants.isPlistFileType;
isPlistFileType = constants.isPlistFileType,
isModuleMapFileType = constants.isModuleMapFileType;

function pbxProject(filename) {
if (!(this instanceof pbxProject))
Expand Down Expand Up @@ -582,7 +583,7 @@ pbxProject.prototype.addPbxGroup = function (filePathsArray, name, path, sourceT
} else {
this.addToPbxFileReferenceSection(file); // PBXFileReference
pbxGroup.children.push(pbxGroupChild(file));
if(isHeaderFileType(file.lastKnownFileType) || isPlistFileType(file.lastKnownFileType)) {
if(isHeaderFileType(file.lastKnownFileType) || isPlistFileType(file.lastKnownFileType) || isModuleMapFileType(file.lastKnownFileType)) {
continue;
}

Expand Down