Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 707
Dany Y Avatar asked Oct 17 '25 03:10

Dany Y


1 Answers

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).

like image 174
Jaromir Sima Avatar answered Oct 19 '25 09:10

Jaromir Sima