cordova-plugin-braintree icon indicating copy to clipboard operation
cordova-plugin-braintree copied to clipboard

Unexpected key "NSMainNibFile~ipad" while parsing error when installing the plugin for iOS platform

Open ryaa opened this issue 5 years ago • 3 comments

The error is as follows:

Adding cordova-plugin-braintree to package.json
Unexpected key "NSMainNibFile~ipad" while parsing <dict/>.
[ERROR] An error occurred while running subprocess cordova.

        cordova plugin add https://github.com/fbognini/cordova-plugin-braintree exited with exit code 1.

The problem is that one of the pre-requisites for this plugins is plist.js (https://github.com/TooTallNate/plist.js) and it has a bug when it incorrectly handles a empty string key, which causes this error - see https://github.com/TooTallNate/plist.js/issues/79

This is not really the problem of this plugin but one of the dependencies. While there was a pull request to fix this (https://github.com/TooTallNate/plist.js/pull/81) the problem still exists with the latest version of plist.

The temporary workaround is to install the plist from the fork where the fix is implemented https://github.com/akofman/plist.js

To install please run

npm install https://github.com/akofman/plist.js.git --save

This seems allowing to install the plugin without the above error

ryaa avatar Jan 09 '20 15:01 ryaa

This did not work for me. I'm getting the same exact error when trying to install the braintree plugin. I installed plist before but it didnt help. So I came here and saw this. I removed plist and the ran the install command above. I then readded the ios platform in cordova and got the same error.

This is preventing me from integrating braintree, any ideas?

nascarjake avatar Jan 15 '20 00:01 nascarjake

This is preventing me from integrating braintree, any ideas?

hmm. This Braintree plugin has not been updated/fixed for quite a while. I found one of the forks which has some fixes and used it - see https://github.com/Taracque/cordova-plugin-braintree/issues/65 Here are the related packages from my package.json that i have on my machine and everything seems to be working.

    "xcode": "^2.1.0"
    "plist": "git+https://github.com/akofman/plist.js.git",
    "cordova-plugin-braintree": "git+https://github.com/fbognini/cordova-plugin-braintree.git",

ryaa avatar Jan 16 '20 14:01 ryaa

Is there any update on this issue @Taracque . I am facing this issue continuously on IOS while adding IOS using ionic Cordova platform add ios. This is blocking our production release. Do you have fix for this.

Getting same issue - Unexpected key "NSMainNibFile~ipad" while parsing . as Braintree starts adding into the application and then it fails with this error. I tried with above solution and the repo, it starts giving some error in Xcode related to ENUMERATOR in TARGET section of the xcode.

architsoni avatar May 17 '21 03:05 architsoni