0
votes

I'm getting some weird error while trying to add cordova wkwebview plugin in my existing application.

Error: if i try to update ios cordova platform

///////////////// admins-mbp:WKWebView admin$ cordova platform update ios Updating ios project... Error: Uncaught, unspecified "error" event. (updatePlatform is not callable from the iOS project API, you will need to do this manually.) /////////////////////////////////////////////////////////////

Error: if i try to run cordova project from the CLI

////////////////// admins-mbp:WKWebView admin$ cordova run Error: could not find -Info.plist file, or config.xml file. /////////////////////////////////////////////////////////////

Error: if i try to add cordova plugin WKWebview

/////////////// admins-mbp:WKWebView admin$ cordova platform update ios Updating ios project... Error: Uncaught, unspecified "error" event. (updatePlatform is not callable from the iOS project API, you will need to do this manually.) admins-mbp:WKWebView admin$ cordova plugin add cordova-plugin-wkwebview-engine Fetching plugin "cordova-plugin-wkwebview-engine" via npm Installing "cordova-plugin-wkwebview-engine" for ios Failed to install 'cordova-plugin-wkwebview-engine':CordovaError: could not find -Info.plist file, or config.xml file. at Object.parseProjectFile [as parse] (/Users/Tanuj/World Bank/CVS CodeBase/WKWebView/WKWebView/platforms/ios/cordova/lib/projectFile.js:50:15) at Plugman.addPlugin (/Users/Tanuj/World Bank/CVS CodeBase/WKWebView/WKWebView/platforms/ios/cordova/lib/plugman/Plugman.js:69:31) at Api.addPlugin (/Users/Tanuj/World Bank/CVS CodeBase/WKWebView/WKWebView/platforms/ios/cordova/Api.js:187:53) at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:611:6) at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:407:28 at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54) at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30) at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13) at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:509:49 at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17) Error: could not find -Info.plist file, or config.xml file. admins-mbp:WKWebView admin$ /////////////////////////////////////////////////////////////

I'm new to this cordova platform, so i don't know what kind of error is this, also when i tried the same plugin in new project; it adds this plugin.

I think this is some cordova version issue. Please help me as i'm stuck with this and no way to move ahead.

1
I think we can solve this issue, if we can update cordova iOS platform. As i try same with new cordova project; and successfully added this plugin in newer project. We can do this by 1. Removing the current ios platform... which will also remove my project files.. which i don't want. 2. Updating the ios platfrom.. which is giving me unknown error.Tanuj

1 Answers

2
votes

I have the similar error and found the solution here

Basically, I've this issue on ionic. But doesn't matter you can use this solution.

  1. cordova platform remove ios
  2. cordova platform list for being sure, that ios platform deleted
  3. cordova platform add ios --save

And it is.

If anyone have the same error on android, you can only replace the ios with android.

Hope it helps.