1

I am using the Cordova 6.3.1. Attempting to build to iOS using the Cordova CLI gives the problem as shown below. $ cordova build ios

Error: Pruning at selector "/widget/plugins" from "/Users/path/to/cordova/project/cordova/platforms/ios/Myproj/config.xml" went bad.

I also get the same error when updating the platform:

$ cordova platform update ios

Updating ios project...
iOS project updated with cordova-ios@4.2.1
Error: Pruning at selector "/widget/plugins" from "/Users/path/to/cordova/project/cordova/platforms/ios/Myproj/config.xml" went bad.

1) What exactly does this pruning error mean?

I notice that the config.xml located in cordova/platforms/ios/Myproj/ does not contain any information from my root config.xml. It is just the default file that starts off like this:

<widget xmlns     = "http://www.w3.org/ns/widgets"
        id        = "io.cordova.helloCordova"
        version   = "2.0.0">
    <name>HelloCordova</name>

    <description>
        A sample Apache Cordova application that responds to the deviceready event.
    </description>

My root config.xml file starts off like this:

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.myproj.app" version="1.0.38" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Myproj</name>
    <description>
        Some description.
    </description>

Meanwhile, installation seemed fine when I did the following to add the platform:

$ cordova platform add ios

Adding ios project...
Creating Cordova project for the iOS platform:
        Path: ../../../../../desktop/dev/path/to/my/project/cordova/platforms/ios
        Package: com.myproj.app
        Name: Myproj
iOS project created with cordova-ios@4.2.1
Installing "com.mbppower.camerapreview" for ios
Installing "com.phonegap.plugins.PushPlugin" for ios
Installing "cordova-plugin-device" for ios
Installing "cordova-plugin-globalization" for ios
Installing "com.telerik.plugins.healthkit" for ios
Installing "com.transistorsoft.cordova.background-geolocation" for ios
Installing "cordova-plugin-dialogs" for ios
Installing "cordova-plugin-background-fetch" for ios
Installing "cordova-plugin-afnetworking" for ios
Plugin "cordova-plugin-background-fetch" already installed on ios. Making it top-level.
Installing "cordova-plugin-camera" for ios
Installing "cordova-plugin-compat" for ios
Dependent plugin "cordova-plugin-compat" already installed on ios.
Installing "cordova-plugin-console" for ios
Plugin "cordova-plugin-device" already installed on ios. Making it top-level.
Plugin "cordova-plugin-dialogs" already installed on ios. Making it top-level.
Installing "cordova-plugin-file" for ios
Dependent plugin "cordova-plugin-compat" already installed on ios.

The Android Persistent storage location now defaults to "Internal". Please check this plugins README to see if you application needs any changes in its config.xml.

If this is a new application no changes are required.

If this is an update to an existing application that did not specify an "AndroidPersistentFileLocation" you may need to add:

      "<preference name="AndroidPersistentFileLocation" value="Compatibility" />"

to config.xml in order for the application to find previously stored files.


Installing "cordova-plugin-file-transfer" for ios
Dependent plugin "cordova-plugin-file" already installed on ios.
Installing "cordova-plugin-geolocation" for ios
Dependent plugin "cordova-plugin-compat" already installed on ios.
Dependent plugin "cordova-plugin-globalization" already installed on ios.
Installing "cordova-plugin-http" for ios
Dependent plugin "cordova-plugin-file" already installed on ios.
Installing "cordova-plugin-inappbrowser" for ios
Installing "cordova-plugin-media-capture" for ios
Dependent plugin "cordova-plugin-file" already installed on ios.
Dependent plugin "cordova-plugin-compat" already installed on ios.
Installing "cordova-plugin-pedometer" for ios
Installing "cordova-plugin-photokandy-video-thumbnail" for ios
Dependent plugin "cordova-plugin-file" already installed on ios.
Installing "cordova-plugin-whitelist" for ios
Installing "phonegap-plugin-barcodescanner" for ios

2) How does platform installation work? More specifically how does it tell what should be in the platform specific config.xml?

I hope these questions can be answered in the context for getting my build to run. Some other background info: I am using Sencha Touch and building with $sencha app build native using Sencha Cmd which initiated the original Cordova project folder.

writofmandamus
  • 1,151
  • 1
  • 23
  • 40

2 Answers2

0

cordova plugins --list open x-code find these plugins maybe cordova plugins list have some plugins but ios project is not.

you can delete it DIY and install again platform > ios > fecth.json or ios.json or package.json hope helpful

sorry , i'm not good at english.

weisss
  • 1
  • 2
0

For me the solution from this post worked out: Cordova pruning error for android config xml

You have to remove all plugins and platforms, update cordova and then add again all plugins and platforms. To cleanup the plugins and my ios platform i wrote a npm script:

{
    ...
    "rm-plugins": "cordova plugins list | awk '{print $1}' | xargs cordova plugins rm",
    "rm-platforms": "cordova platforms remove ios",
    "cleanup": "npm run rm-platforms && npm run rm-plugins && npm update cordova"
    ...
}

PS: I have not exactly the same error message as you had:

Error: Pruning at selector "/*/plugins" from "/Users/Thomas/work/repos/nexboard/iOS/nexboard/platforms/ios/neXboard/config.xml" went bad.
Community
  • 1
  • 1
Chaoste
  • 544
  • 6
  • 17