I'm trying to create a Flutter Plugin to use a native library. This library I'm trying to use is stored in a private repository and can be used with Swift Dependency Manager.
This is causing me a headache, cause I can't add a private repository dependency in my plugin (I couldn't find a way to do this in .podspec file), so what I've done:
- I've added the plugin to the Example project with Swift Package Manager
- Manually copied
MyDependency.xcframeworkfolder toMyPlugin/iosfolder - Referenced it in podspec file, like this:
s.preserve_paths = 'MyDependency.xcframework'
s.xcconfig = { 'OTHER_LDFLAGS' => '-framework MyDependency' }
s.vendored_frameworks = 'MyDependency.xcframework'
Doing this I'm able to use MyDependency inside plugin's sources.
My current problem is: This is only working in Simulator.
Before doing this, the project was running without any problem in real devices.
This is the error message I'm receiving every time I tried to run in a real device:

Also, I've made a test using the dependency directly from Swift Dependency Manager and is working fine. I think the problem is the way I'm adding the framework to my plugin.





