I have a hosted, CMS-based web app that I want to package as an Android / iOS app with Ionic Capacitor. So I added
"server": {
"url": "https://my.domain/"
},
to capacitor.config.json and did
import { Capacitor, Plugins } from '@capacitor/core';
console.log('Plugins', Capacitor.Plugins);
in the main Javascript file of my app (I use webpack for bundling). This basically works, i.e. the app gets loaded and displayed properly. But on the console I see that Capacitor loads the web versions of the plugins, and Device.getInfo()
says that the platform is "web", not "android".
How can I make Capacitor act like it would when my app was loaded from the device's file system, and in particular how can I make it use the native versions of the plugins in this setup?
Capacitor.Plugins.Device.getInfo()
), do you get the same result?. Anyway, I would advise against pointing to an url, that's supposed to be used for development, (i.e, point to a local live reload server), not to a website. – Shewchuk