I am developing a capacitor plugin for my ionic app and it's using a 3d party sdk.
In order to use it in my ios Plugin.swift I copy the .xframework in my plugin's ios folder, add pod ' ', :path => '' in the Plugin/ios .podfile and run pod install. That makes the sdk available for my plugin.
When I build and open my ios project that includes the plugin in xcode I get an error at my sdk import. The way to get past this error is adding the .xcframework in the root of my capacitor plugin and add it as s.vendored_frameworks = " " in my plugins .podspec.
Is there a way to avoid adding the .xcframework two times in my plugin(root & ios folder)?
I've tried a relative path in the s.vendored_frameworks ="./ios/Frameworks/my_framework.xcframework" that doesn't seem to work.
After doing a clean install relative path worked! steps I used to solve this:
pod deintergrate & pod install in myPlugin/ios npm install & npx cap sync in my project
now both my plugin & the project can see the sdk import