Adding swift packages to custom capacitor plugins #6906
Unanswered
jonathankehler
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a custom plugin that works fine. I want to add a swift package as a dependency to the plugin.
I want to import this package in my plugin swift code and use it.
Can anyone give me some pointers on how to get started on this?
Feels like i've tried a hundred variations. If I add the dependency in the plugin project then when I do
npx cap sync
it doesn't seem like the dependency is synced to the main xcode project and opening that shows its not there.If I add the dependency in the main xcode project after
npx cap sync
then its importable from all swift files EXCEPT the swift files in the Plugin directories.No matter what I do, when I open the main xcode project and try to build it the import fails because it can't find the module.
Is there a specific way the dependency has to be added to the plugin project?
Does the dependency get sync'd to the main project and if so how?
Beta Was this translation helpful? Give feedback.
All reactions