Github user shazron commented on a diff in the pull request:

    https://github.com/apache/cordova-ios/pull/234#discussion_r69504623
  
    --- 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 <framework>');
    +                //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) { 
    --- End diff --
    
    use Array.filter instead


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to