Dany Y
Dany Y

Reputation: 7041

Capacitor add plugin to only 1 platform

I would like to add the plugin ios-swipe-back, but unfortunatelly it’s causing issues on android.

I don’t need the plugin on android, but removing it manually from gradle recreates it whenever i want to resync

Is there a way to specify a plugin for only 1 platform ?

I saw this for cordova, but don't know if there's something similar for Capacitor

How to add a plugin on only one Ionic platform?

Thanks

Upvotes: 4

Views: 1797

Answers (1)

Jaromir Sima
Jaromir Sima

Reputation: 106

I have the same problem with capacitor-ios-app-tracking plugin working only on ios. If you are using capacitor 3, you can try to use includePlugins property for the specific platform (overriding global includePlugins property).

Check documentation https://capacitorjs.com/docs/config

I didn't find solution for this in older versions of capacitor (v2).

Upvotes: 7

Related Questions