iOS With Objective-C, need to rename AppDelegate, yet doing so will cause the initial defined CAP_PLUGIN / CapacitorBinderPlugin to not work


I’ve been writing an Ionic + Vue project for a long time for iOS and Android. Now, we need to include some Objective-C in our Swift project.

After a few hours of digging for duplicate @intefaces of AppDelegator it led me to the following Known Issues - Ionic Portals that states to rename the default AppDelegate. No problem.

But now the default CAP_PLUGIN as defined in my CapacitorBinder as

CAP_PLUGIN(CapacitorBinderPlugin, "CapacitorBinder", ...

Doesn’t work anymore. The load method of my public class CapacitorBinderPlugin: CAPPlugin {}... is simply never called.

Any ideas of how the initial plugin is called?

Some hints:

  • There is now a populated bridging header, the default one was empty.
  • Nothing else has changed, all the Capacitor / Ionic related code remains the same.