Capacitor how to remove platform
Asked Answered
D

1

13

Documentation on capacitor doesn't mention how to remove a platform.

And remove does not exist.

enter image description here

Does capacitor even support removing of a platform? How do I remove my platform without the obvious - manually deleting the folder

Dyaus answered 11/3, 2021 at 9:35 Comment(0)
F
23

Unlike Cordova, native projects in Capacitor are a source asset instead of a build time asset.

You will have to delete the whole project manually and re add it with npx cap add.

Fizzle answered 11/3, 2021 at 12:56 Comment(3)
This is pretty dumb. Oh well.Dyaus
Since I can't physically delete the folder because I'm doing automation on a Kubernetes server, following up on @johnborgens's answer I had to update my deployment scripts to delete the folders. rm -rf apps/myionicproject/android && rm -rf apps/myionicproject/iosDyaus
@nicholaslabrecque when syncing you can choose which platform to sync: npx cap sync platform androidFizzle

© 2022 - 2024 — McMap. All rights reserved.