You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/05/22 06:36:00 UTC
[jira] [Commented] (CB-13592) comment is not removed on removing
embedded frameworks
[ https://issues.apache.org/jira/browse/CB-13592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16483556#comment-16483556 ]
ASF GitHub Bot commented on CB-13592:
-------------------------------------
shazron closed pull request #5: CB-13592 Fixed bug where comment is not removed on removing embedded frameworks.
URL: https://github.com/apache/cordova-node-xcode/pull/5
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/lib/pbxProject.js b/lib/pbxProject.js
index c14f28b..0c05d09 100644
--- a/lib/pbxProject.js
+++ b/lib/pbxProject.js
@@ -484,10 +484,11 @@ pbxProject.prototype.removeFromPbxBuildFileSection = function(file) {
if (this.pbxBuildFileSection()[uuid].fileRef_comment == file.basename) {
file.uuid = uuid;
delete this.pbxBuildFileSection()[uuid];
+
+ var commentKey = f("%s_comment", uuid);
+ delete this.pbxBuildFileSection()[commentKey];
}
}
- var commentKey = f("%s_comment", file.uuid);
- delete this.pbxBuildFileSection()[commentKey];
}
pbxProject.prototype.addPbxGroup = function(filePathsArray, name, path, sourceTree) {
diff --git a/test/removeFramework.js b/test/removeFramework.js
index 248a1e7..20cdbde 100644
--- a/test/removeFramework.js
+++ b/test/removeFramework.js
@@ -165,6 +165,33 @@ exports.removeFramework = {
test.ok(current.indexOf(expectedPath) == -1);
}
+ test.done();
+ },
+ 'should remove embedded frameworks': function (test) {
+ var newFile = proj.addFramework('/path/to/Custom.framework', { customFramework: true, embed:true, sign:true }),
+ frameworks = proj.pbxFrameworksBuildPhaseObj(),
+ buildFileSection = proj.pbxBuildFileSection(),
+ bfsLength = Object.keys(buildFileSection).length;
+
+ test.equal(frameworks.files.length, 16);
+ test.equal(62, bfsLength);
+
+ var deletedFile = proj.removeFramework('/path/to/Custom.framework', { customFramework: true, embed:true }),
+ frameworks = proj.pbxFrameworksBuildPhaseObj(),
+ buildFileSection = proj.pbxBuildFileSection(),
+ bfsLength = Object.keys(buildFileSection).length;
+
+ test.equal(frameworks.files.length, 15);
+ test.equal(58, bfsLength);
+
+ var frameworkPaths = frameworkSearchPaths(proj);
+ expectedPath = '"/path/to"';
+
+ for (i = 0; i < frameworkPaths.length; i++) {
+ var current = frameworkPaths[i];
+ test.ok(current.indexOf(expectedPath) == -1);
+ }
+
test.done();
}
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
> comment is not removed on removing embedded frameworks
> -------------------------------------------------------
>
> Key: CB-13592
> URL: https://issues.apache.org/jira/browse/CB-13592
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-node-xcode
> Affects Versions: Master
> Environment: Mac OS high Sierra.
> Reporter: Kelvin Ho
> Assignee: Anis Kadri
> Priority: Major
> Fix For: Master
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> Currently after adding an embedded framework, 4 entries are added to the PBXBuildFileSection.
> {{ "128CD4F705D24987A12F213E": {
> "isa": "PBXBuildFile",
> "fileRef": "021AA25C78F942DA94C24904",
> "fileRef_comment": "EmbedThirdParty.framework"
> },
> "128CD4F705D24987A12F213E_comment": "EmbedThirdParty.framework in Frameworks",
> "B9B17AE7AA7C4663BA933B64": {
> "isa": "PBXBuildFile",
> "fileRef": "021AA25C78F942DA94C24904",
> "fileRef_comment": "EmbedThirdParty.framework",
> "settings": {
> "ATTRIBUTES": ["CodeSignOnCopy"]
> }
> },
> "B9B17AE7AA7C4663BA933B64_comment": "EmbedThirdParty.framework in Embed Frameworks",}}
> After calling removeFramework function, the current existing code will incorrectly leave a orphan entry in the PBXFileSection:
> {{ "B9B17AE7AA7C4663BA933B64_comment": "EmbedThirdParty.framework in Embed Frameworks",}}
> Pull request #5 fixes this issue, and adds a relevant unit test in removeFramework.js
> https://github.com/apache/cordova-node-xcode/pull/5
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org