How to remove iOS platform from Capacitor Plugin?

I am developing a new Capacitor plugin for communication between Android and USB device. So I don’t need iOS implementation.
Is there any way to remove iOS from plugin?
Or should I throw unimplemented error for each plugin method, as described here?

It depends on how do you want your users to use your plugin.

If you don’t include the iOS code, users will have to use Capacitor.isPluginAvailable('yourPluginName') before using the plugin.
If you include iOS code that throws unimplemented, your users will have to put your Plugin code inside a try-catch.

To remove iOS from a plugin, remove the iOS folder, remove the .podspec file on the root and the references to them in the files section of the package.json and the ios object inside capacitor object in the package.json

1 Like

I uninstalled iOS related packages too (@capacitor/ios, @ionic/swiftlint-config, swiftlint) and removed swiftlint config from package.json.
It worked fine :+1:
Many thanks! :pray: