Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9408C200B49 for ; Tue, 5 Jul 2016 06:12:13 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 92CE1160A65; Tue, 5 Jul 2016 04:12:13 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DA53C160A75 for ; Tue, 5 Jul 2016 06:12:12 +0200 (CEST) Received: (qmail 83909 invoked by uid 500); 5 Jul 2016 04:12:11 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 83871 invoked by uid 99); 5 Jul 2016 04:12:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jul 2016 04:12:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 091CC2C02A7 for ; Tue, 5 Jul 2016 04:12:11 +0000 (UTC) Date: Tue, 5 Jul 2016 04:12:11 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-9825) Support third-party package managers like Cocoapods and Nuget MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 05 Jul 2016 04:12:13 -0000 [ https://issues.apache.org/jira/browse/CB-9825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15361972#comment-15361972 ] ASF GitHub Bot commented on CB-9825: ------------------------------------ Github user shazron commented on a diff in the pull request: https://github.com/apache/cordova-ios/pull/234#discussion_r69505429 --- Diff: bin/templates/scripts/cordova/Api.js --- @@ -236,10 +317,50 @@ Api.prototype.addPlugin = function (plugin, installOptions) { * CordovaError instance. */ Api.prototype.removePlugin = function (plugin, uninstallOptions) { - var xcodeproj = projectFile.parse(this.locations); return PluginManager.get(this.platform, this.locations, xcodeproj) .removePlugin(plugin, uninstallOptions) + .then(function() { + if (plugin.getFrameworks(this.platform).length === 0) return; + console.log('Looking into removing pods since the plugin contained '); + //require script to run pod remove + //pods.json might not exist (if not pods were removed). + //the pod will already be removed from pods.json at this stage + //need to check podfile and see if a pod exists in podfile that doesn't exist in pods.json. If so, remove it. + + // which pods are in the plugin? + var frameworkTags = plugin.getFrameworks(this.platform); + var project_dir = this.locations.root; + var pods_file = path.join(project_dir, 'pods.json'); + var array_of_pod_objects = []; + + delete require.cache[require.resolve(pods_file)]; + var pods = require(pods_file); + + // check if any of the framework tags are of type "podspec" + frameworkTags.forEach(function (obj) { + if (obj.type == 'podspec') { + array_of_pod_objects.push(obj); + } + }); + + var podMod = require('./lib/podMod'); + + array_of_pod_objects.forEach(function (obj) { + // according to pods.json, does more than one plugin depend on the pod? + if (pods[obj.src].count > 1) { --- End diff -- Inconsistent logic from your other code: https://github.com/apache/cordova-ios/pull/234/commits/e95fd6f393b7888b8d739dfbe8bd84805e30c67e#diff-4dd01b7c4b3f825b9b9e6f223a83ec71R104 > Support third-party package managers like Cocoapods and Nuget > ------------------------------------------------------------- > > Key: CB-9825 > URL: https://issues.apache.org/jira/browse/CB-9825 > Project: Apache Cordova > Issue Type: New Feature > Components: CordovaLib > Reporter: Shazron Abdullah > Assignee: Julia Geist > Labels: cordova-ios-5.0.x > > ML discussion: > http://markmail.org/message/5qvg6rwr4nz4q7mc > cordova-discuss proposal (to be brought back to the list when finalized): > https://github.com/cordova/cordova-discuss/blob/master/proposals/ThirdPartyPackageManagers.md > From Steve Gill in the ML: > At the Cordova F2F, everyone seemed to agree that we should bring CocoaPods > support to plugins as dependencies for iOS. > Cordova-android currently uses Gradle as a way to enable external > dependency resolution for plugins using the framework tag. > A suggestion about using the engine tag to fetch cocoapods-cli (mac) & > NuGet (windows) followed by using the framework tag was discussed. > The minutes[1] show Carlos, Shaz and Raghav as looking into the design. > Someone should write up a proposal on cordova-discuss[2] and create the > issues. Post them in this thread. > This shouldn't take priority over cordova-ios 4 issues. > [1] > https://docs.google.com/document/d/1MArKRmnLS052LBbhPxJF57_4ZivghOj8znWo5sTCkbU/edit?usp=sharing > [2] https://github.com/cordova/cordova-discuss -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org