Plugin not found, or is not a CDVPlugin. Check your plugin mapping in config.xml ionic1 ios

My app is built in ionic1 and is using 2 custom plugins and one of those plugins is not loading properly in ios. I can see the error in console log of xcode which is “CDVPlugin UDPSender class does not exist”. I have tried few of the answers already answered here but none of them worked for me like

  • removing and adding platform again
  • adding .swift or .m file in Build phases->compiled sources in xcode
  • removing ios.json file and then making build again

When I debug the app from safari, I get this error “undefined is not a function”. Actually sendRequest function present in UdpSender.js file is called from ControllerRequest.js file and as the plugin is not loaded so this error is shown in console of safari. Plugin is written in swift so bridging header.h file is also added, may be I am not adding the udpsender.swift file in compiled sources in the right way

https://stackoverflow.com/a/56767857/5568646

This was the solution to my query