- Node 9.5.0
- NPM 5.6.0
- Cordova 8.0.0
After cloning the repo cd into the root directory of the project and run:
- npm install
- cordova prepare ios --verbose
The plugins will fail to install correctly and the contents of the generated plugins/fetch.json file is messed up:
Also, the output of the cordova prepare ios --verbose makes it quite clear that something went wrong during the installation:
The installation process seems to mess up the installation of the customurlscheme plugin with that of the splashscreen plugin.
The root of the problem seems to be in the add.js cordova-lib file.
This seems to suggest that somewhere between these two lines cordova messes up the plugins somehow.
The code is somewhat difficult to understand but the root cause seems to be this pluginInfo global variable. Its value is assigned in the callback of a promise, read from another callback of a promise, while a whole chain of promises is set using a reduce function.
Replacing "cordova-plugin-splashscreen": "^5.0.1" with "cordova-plugin-splashscreen": "5.0.1" in package.json makes the prepare command complete succesfully (demo branch). This is a small example of the volatility of the bug.