Announcing Capacitor 3.0

Because Capacitor’s CLI isn’t the one handling the live reload. Ionic is.

Hi,

We have upgraded successfully to Capacitor 3.0.
We run into an issue now when running the app in the chrome simulator (development tools) in responsive mode and when running the app in Firefox in Responsive Design Mode. We get the message “Unhandled Rejection (Error): “Keyboard” plugin is not implemented on web”. This error (obviously) does not occur when running the app in the browser from my phone.
Before we moved to Capacitor 3.0 we checked if there was an implementation for the Keyboard plugin like this:

import { Capacitor, Plugins, KeyboardInfo } from '@capacitor/core';

some more code

if(Capacitor.isPluginAvailable("Keyboard")) {

Now we can’t check if the PlugIn is available and it seems the error occurs as soon as the Plugin is imported. This is rather annoying because we can’t run the app in responsive mode in the Browser anymore to some quick checks.

Is there a solution for this?

other than that we are very happy with Capacitor 3 and especially the ability to run the simulator without having to open XCode (or Android Studio) and the new Permissions API!

Most of the plugins have been factored out from core.
You need to import it separately:
import { Keyboard } from '@capacitor/keyboard';

yes we did.
The problem was checking if the plugin is available so it does not run on a desktop. As it turns out, the method Capacitor.isPluginAvailable(“Keyboard”)) is still available, it was just missing from the documentation.

1 Like

Hello @mhartington ,

i am using Ionic v5, React v17, Capacitore v2.4.6 & TypeScript 4.4.3 (using ES5 in the tsconfig.json file)… How to securily upgrade my project to Capacitor v3 without damaging my existing project and when in the future I upgrade to Ionic v6 & TypeScript to ES6 does this not provide any problem ?

Thank you.

thanks , it worked for me.