I cannot seem to find a real solution for my problem anywhere.. After following the Capacitor documentation and creating successfully an app as well as a plugin, i’ve linked them both using the following commands:
in plugin directory:
-npm run build -npm link
in app’s directory:
-npm link plugin-name -npm install -npx cap sync
I open the app’s workspace and want to run it on my device but instead I am getting an error in the added plugin of the app, that a certain library I’m using in it does not exist.
p.s Plugin builds normally and has no issues. This occurs only after I’m linking both plugin and app. Am I doing something wrong?
As of this moment I have solved the issue I had. Shamefully there aren’t really any precise documentation regarding the subject so I’ll try to answer as best I can:
My issue got resolved when I updated the
dependencies inside the .podspec file inside my plugin’s folder.
The specific package I wish to use with the plugin, should be specified inside the
.podspec file i.e. :
s.dependency 'PicUPSDKv3' should be added.
-npx cap sync on my main project’s folder, all pods were initialized correctly and I was able to build and run the project alongside the plugin without any errors.
Answered By – JeanDArc