Capacitor iOS with SPM doesn't work

Hello, I’m trying to setup a swift package connection via capacitor. How I’m trying to do it:
At first I decided to just follow the example in order to fully understand the mechanism of how capacitor works. I am creating the code following the capacitor example from this link Custom Native iOS Code | Capacitor Documentation and if I do not add SPM support to the capacitor project then it works fine (here is my repository with a working example - https:// GitHub - BelyaevAlex/Capacitor_ios_CocoaPods ), but to connect the Swift package, you need SPM support, in capacitor, as I understand it, it was added from version 6 - Swift Package Manager | Capacitor Documentation but when I initialize ios project following the example from this link and then I follow exactly the same path as in the example from the first link, the function is not called. What could be the problem? Maybe I’m doing something wrong?