[Capacitor] My First Try


I just tried to build my first Capacitor project.

Always fun to dig in the minds of the developer team that created it as the docs are still work in progress.

I did manage to get a simple starter project (ionic start) to run in the emulator (Android), but now struggling to get a simple plugin (Network, Geolocation) to work. Anyway. I will keep on struggling :slight_smile:

First impression is that the CLI support will be crucial to show the same or better workflow as with Ionic Native projects. Especially if you want to do a livereload-like situation to an emulator

Secondly, building in Android Studio is much faster then the Cordova version. A few seconds to update once the ionic build has finished. Just a matter of finding a CLI way of kicking the APK in the emulator.

Thirdly, I have to get used to the word capacitor. I am not dyslectic, but making typos all the time. cpacitor, capacitator, … Anyway, this will fade away I assume

So far so good.



Sounds cool, thx for your interesting feedback.

Didn’t I time yet to try capacitor because I spent time playing with Stencil the last couple of weeks…so much fun with all the tech these Ionic guys are developing :slight_smile:

1 Like

What do you mean by that exactly?
Traditionally live-reload is not a job of the native wrapper (e.g. Cordova) but the web app (e.g. Ionic). Technically it is a piece of JS code that is running and listening to a server, if it should trigger a reload because the content has changed because of a rebuild. And a rebuild is still the domain of the web app CLI.
So my guess: When Capacitor gets integrated into Ionic CLI, live reload will be available as well.

But I totally agree that live reload support would be very nice.

That CLI actually already exists - gradle can quite easily be called on the command line to build Android apps. Someone only has to write it all down in the context of Capacitor… (iOS is much toucher here though :/)

Another option would be to extract the run, build, emulate bits from the Cordova CLI and port them to the Capacitor project. But as you said, in comparison this is quite slow, so I am not sure if this is worth the effort.

Same here - it is really not the most common thing for a non English native.
BUT: The CLI can also just be called via npx cap ... which is much easier to type and get right on the first try :wink: