Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ryaa opened this issue Jan 9, 2020 · 3 comments

Comments

@ryaa
Copy link

ryaa commented Jan 9, 2020

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 TooTallNate/plist.js#79

This is not really the problem of this plugin but one of the dependencies. While there was a pull request to fix this (TooTallNate/plist.js#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 ryaa changed the title Unexpected key "NSMainNibFile~ipad" while parsing when installing the plugin for iOS platform Unexpected key "NSMainNibFile~ipad" while parsing error when installing the plugin for iOS platform Jan 9, 2020
@nascarjake
Copy link

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?

@ryaa
Copy link
Author

ryaa commented Jan 16, 2020

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 #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",

@architsoni
Copy link

architsoni commented May 17, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants