Hi,
I have an app that can be distributed as spa or pwa built on Quasar (https://quasar.dev) and we need to ship it as native app (using capacitor).
Should I include the capacitor js files somewhere or are they injected automatically in the ?
Also, running on Android I’m getting some JS errors - how can I access detailed webview log messages?
Thanks in advance
Hi thanks for replying
Yes, I did and still not clear (for me) if the script gets injected automatically or not.
Looking at the source code of the synced folder (ios or android) I can’t see anything added to the index.html file
quasar has it’s own Capacitor integration.
Capacitor doesn’t have a capacitor.js file that you have to add to your index.html
If you need to use any of the Capacitor utilities you’ll just import Capacitor
object from @capacitor/core
package like this:
import { Capacitor } from '@capacitor/core';
If you want to use any of the Capacitor plugins you’ll have to install the plugin package from npm and use it as described in the plugin docs, in example for Device plugin:
import { Device } from '@capacitor/device';
const logDeviceInfo = async () => {
const info = await Device.getInfo();
console.log(info);
};
If you are using quasar + vue without typescript you might need to add it
thank you, I’ll give it a try