Skip to content

Commit 8777435

Browse files
committed
fix: modulemap added to ResourcesBuildPhase
1 parent 89f658e commit 8777435

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#
2020
-->
2121

22-
# cordova-node-xcode
22+
# nativescript-dev-xcode
2323

2424
<!--
2525
[![NPM](https://nodei.co/npm/nativescript-dev-xcode.png?compact=true)](https://nodei.co/npm/xcode/)

lib/constants.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ var FILETYPE_BY_EXTENSION = {
4242
xcodeproj: 'wrapper.pb-project',
4343
xctest: 'wrapper.cfbundle',
4444
xib: 'file.xib',
45-
strings: 'text.plist.strings'
45+
strings: 'text.plist.strings',
46+
modulemap: 'sourcecode.module-map'
4647
},
4748
GROUP_BY_FILETYPE = {
4849
'archive.ar': 'Frameworks',
@@ -111,6 +112,10 @@ function unquoted(text) {
111112
return text == null ? '' : text.replace (/(^")|("$)/g, '')
112113
}
113114

115+
function isModuleMapFileType(fileType) {
116+
return fileType === FILETYPE_BY_EXTENSION.modulemap;
117+
}
118+
114119
module.exports = {
115120
DEFAULT_SOURCETREE,
116121
DEFAULT_PRODUCT_SOURCETREE,
@@ -131,5 +136,6 @@ module.exports = {
131136
isResource,
132137
isEntitlementFileType,
133138
isPlistFileType,
139+
isModuleMapFileType,
134140
unquoted
135141
}

lib/pbxProject.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ var util = require('util'),
3434
isResource = constants.isResource,
3535
isEntitlementFileType = constants.isEntitlementFileType,
3636
isAssetFileType = constants.isAssetFileType,
37-
isPlistFileType = constants.isPlistFileType;
37+
isPlistFileType = constants.isPlistFileType,
38+
isModuleMapFileType = constants.isPlistFileType;
3839

3940
function pbxProject(filename) {
4041
if (!(this instanceof pbxProject))
@@ -582,7 +583,7 @@ pbxProject.prototype.addPbxGroup = function (filePathsArray, name, path, sourceT
582583
} else {
583584
this.addToPbxFileReferenceSection(file); // PBXFileReference
584585
pbxGroup.children.push(pbxGroupChild(file));
585-
if(isHeaderFileType(file.lastKnownFileType) || isPlistFileType(file.lastKnownFileType)) {
586+
if(isHeaderFileType(file.lastKnownFileType) || isPlistFileType(file.lastKnownFileType) || isModuleMapFileType(file.lastKnownFileType)) {
586587
continue;
587588
}
588589

0 commit comments

Comments
 (0)