Skip to content

Commit 32bec2f

Browse files
authored
Merge pull request #4406 from NativeScript/kddimitrov/rebase-node-xcode
fix: update node-xcode library
2 parents b56634f + dfe2fc3 commit 32bec2f

File tree

4 files changed

+63
-34
lines changed

4 files changed

+63
-34
lines changed

lib/services/ios-project-service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,7 @@ We will now place an empty obsolete compatability white screen LauncScreen.xib f
11011101
private async prepareNativeSourceCode(groupName: string, sourceFolderPath: string, projectData: IProjectData): Promise<void> {
11021102
const project = this.createPbxProj(projectData);
11031103
const group = this.getRootGroup(groupName, sourceFolderPath);
1104-
project.addPbxGroup(group.files, group.name, group.path, null, { isMain: true });
1104+
project.addPbxGroup(group.files, group.name, group.path, null, { isMain: true, filesRelativeToProject: true });
11051105
project.addToHeaderSearchPaths(group.path);
11061106
this.savePbxProj(project, projectData);
11071107
}

npm-shrinkwrap.json

+49-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"uuid": "3.0.1",
8484
"winreg": "0.0.17",
8585
"ws": "5.1.0",
86-
"xcode": "https://github.com/NativeScript/node-xcode/archive/NativeScript-1.5.2.tar.gz",
86+
"xcode": "https://github.com/NativeScript/node-xcode/archive/kddimitrov/rebase-upstream.tar.gz",
8787
"xml2js": "0.4.19",
8888
"xmldom": "0.1.21",
8989
"yargs": "6.0.0",

test/ios-project-service.ts

+12-18
Original file line numberDiff line numberDiff line change
@@ -697,17 +697,14 @@ describe("Source code support", () => {
697697

698698
sourceFileNames.map(file => path.basename(file)).forEach(basename => {
699699
const ext = path.extname(basename);
700-
const shouldBeAdded = ext !== ".donotadd";
700+
const shouldBeAdded = ext !== ".donotadd" && !ext.startsWith(".h");
701+
assert.notEqual(pbxFileReferenceValues.indexOf(basename), -1, `${basename} not added to PBXFileRefereces`);
702+
const buildPhaseFile = buildPhaseFiles.find((fileObject: any) => fileObject.comment.startsWith(basename));
701703
if (shouldBeAdded) {
702-
assert.notEqual(pbxFileReferenceValues.indexOf(basename), -1, `${basename} not added to PBXFileRefereces`);
703-
704-
if (shouldBeAdded && !path.extname(basename).startsWith(".h")) {
705-
const buildPhaseFile = buildPhaseFiles.find((fileObject: any) => fileObject.comment.startsWith(basename));
706-
assert.isDefined(buildPhaseFile, `${basename} not added to PBXSourcesBuildPhase`);
707-
assert.include(buildPhaseFile.comment, "in Sources", `${basename} must be added to Sources group`);
708-
}
704+
assert.isDefined(buildPhaseFile, `${basename} not added to PBXSourcesBuildPhase`);
705+
assert.include(buildPhaseFile.comment, "in Sources", `${basename} must be added to Sources group`);
709706
} else {
710-
assert.equal(pbxFileReferenceValues.indexOf(basename), -1, `${basename} was added to PBXFileRefereces, but it shouldn't have been`);
707+
assert.isUndefined(buildPhaseFile, `${basename} must not be added to Sources group`);
711708
}
712709
});
713710
});
@@ -728,17 +725,14 @@ describe("Source code support", () => {
728725

729726
sourceFileNames.map(file => path.basename(file)).forEach(basename => {
730727
const ext = path.extname(basename);
731-
const shouldBeAdded = ext !== ".donotadd";
728+
const shouldBeAdded = ext !== ".donotadd" && !ext.startsWith(".h");
729+
const buildPhaseFile = buildPhaseFiles.find((fileObject: any) => fileObject.comment.startsWith(basename));
730+
assert.notEqual(pbxFileReferenceValues.indexOf(basename), -1, `${basename} not added to PBXFileRefereces`);
732731
if (shouldBeAdded) {
733-
assert.notEqual(pbxFileReferenceValues.indexOf(basename), -1, `${basename} not added to PBXFileRefereces`);
734-
735-
if (shouldBeAdded && !path.extname(basename).startsWith(".h")) {
736-
const buildPhaseFile = buildPhaseFiles.find((fileObject: any) => fileObject.comment.startsWith(basename));
737-
assert.isDefined(buildPhaseFile, `${basename} not added to PBXSourcesBuildPhase`);
738-
assert.include(buildPhaseFile.comment, "in Sources", `${basename} must be added to Sources group`);
739-
}
732+
assert.isDefined(buildPhaseFile, `${basename} not added to PBXSourcesBuildPhase`);
733+
assert.include(buildPhaseFile.comment, "in Sources", `${basename} must be added to Sources group`);
740734
} else {
741-
assert.equal(pbxFileReferenceValues.indexOf(basename), -1, `${basename} was added to PBXFileRefereces, but it shouldn't have been`);
735+
assert.isUndefined(buildPhaseFile, `${basename} must not be added to Sources group`);
742736
}
743737
});
744738
});

0 commit comments

Comments
 (0)