#Capacitor comes with a user-friendly command line interface. To add a new mobile platform to your project, simply run “npx cap add [android | ios]”. And to remove one? Exactly — you guessed it: 'npx cap remove...' But: That command isn’t implemented – for understandable reasons. The interesting thing is, though, that it's "plausible" that it would be there, right?. So it's not surprising that #Claude insists it exists.
This once again highlights a major issue with LLMs that I just can’t shut up about: Just because what the chatbot says sounds 'plausible' doesn't mean it's correct. In the case of AI-assisted coding, that’s not such a big deal – you, the developer, will eventually realise that the AI was wrong. But what about the many other use cases where we blindly trust the AI and put whatever it says into action? 🤔
But back to the topic: For reference, if you ever need to remove a platform in Capacitor:
➡️ Do it manually (just delete the respective directory).
➡️ Or, if you’re in the early stages of your work, just delete the whole project and initialise it again.