Capacitor iOS plugin link problem

I am trying to make my own plugin for WeChat login for capacitor. My step is described as following:

  • create an empty plugin => ok
  • import WechatOpenSDK with Pod integration =>ok
  • Open the plugin project in Xcode, add the WechatOpenSDK header files in Plugin.h, modify the Plugin.swift to use the WXApi.xxx which belong the the WechatOpenSDK => OK
  • Build the plugin framework => ok
  • Open the App project in Xcode, build and run the app => FAILED.

The issue is a link error: Undefined symbol: OBJC_CLASS$_WXApi

The WXApi is an Object class in libWechat.a which should be linked in the Plugin.framework, am I right?

Anyone can help me for this issue? Thanks!

Can anyone please help me on creating the Capacitor plugin with Native iOS SDK/XCFramework?

Thanks in advance.