Plugin not installed IOS

Hello,

I am getting a plugin not installed error in IOS but not in Android. Even though if I try to re-install the plugin the message says the plugin is already installed.

I tried to remove the node_modules, plugins, platform, and www folders and add it again, no use.

After debugging the application finally figured out that,

window.cordova
window.plugins
window.plugin
cordova.plugins
cordova.plugins

objects were not created in the scope.