Ionic: Plugins Not Found

I seem to be having an issue with all Cordova plugins that I am adding to my project. For this question, I will reference specifically the SplashScreen plugin.

The process that I take when building my project for IOS is as follows:

  • ionic cordova platform add ios
  • ionoc cordova prepare ios
  • ionic cordova build ios

At this point, the build will fail with an error 65 on xcode args. After some googling, I found that a solution to this is to perform ionic cordova platform update ios, this fixes the problem and allows me to compile and run my application, yay!

The reason that I have included the above details is, I am worried that perhaps updating the platform is for some reason causing the plugins not to load / be included. Just a thought but thought I would include that process for reference.

When running my project in the IOS emulator on mac, I get the following plugin errors in the console for xCode, this error message is specifically for the StatusBar but is the same for all other plugins I have added:

2017-08-13 20:41:36.391 Shokuni[20906:1123728] CDVPlugin class CDVStatusBar (pluginName: statusbar) does not exist.

The plugins then reset due to page load…
2017-08-13 20:41:37.724 Shokuni[20906:1123728] Resetting plugins due to page load.

Then i get the following error about the status bar, which I assume is because it is being attempted to be used on the first page loaded in the project
2017-08-13 20:41:38.883 Shokuni[20906:1123728] CDVPlugin class CDVStatusBar (pluginName: StatusBar) does not exist.

2017-08-13 20:41:38.883 Shokuni[20906:1123728] ERROR: Plugin 'StatusBar' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.

Inside xCode, in the File Explorer panel on the left, there are no plugins inside the plugin folder, I am wondering whether this could potentially be an issue? I can however see that the plugins that I have installed are available at staging/www/plugins

Anybody had this problem before or knows about what may be going on? If so I would be very grateful.

This sounds very strange. Have you tried opening the Xcode project manually in Xcode and see what it has to say at this stage? Probably you are issing the signing certificate stuff.

Very possible.

Read about it several times, I think we could never really debug it. But you adding the information about update seems like a possible cause.

This is the error I get before updating the platform:

[ERROR] Cordova encountered an error.
        You may get more insight by running the Cordova command above directly.```
        
[ERROR] An error occurred while running cordova prepare (exit code 1):
        
        Using this version of Cordova with older version of cordova-ios is deprecated. Upgrade to cordova-ios@4.0.0 or
        newer.
        Error: Your ios platform does not have Api.js

That also sounds strange. Post your ionic info please for that project.