2

I have an idea to use Onsen UI to create mobile applications and a website simultaneously. This will allow me to use one code base for everything. What problems can I get and what should I consider if I want to place the project on the webserver instead of the build application? Does anyone have a positive or negative experience for this? I will be grateful for any advice.

I also worry about how Onsen UI website will be displayed in various browsers on various platforms. When we build a mobile application, we do not have such a variety of browsers (especially if we use Crosswalk). But it can be a problem if the website is displayed differently for Chrome / IE / Opera / Firefox / Safari on MacOS / iOS / Windows / Linux (and for several versions for each browser). Does anyone know about such problems for Onsen UI?

  • How well does Onsen UI work for desktop (Chrome / firefox / safari ...)? I am also looking at Onsen UI. But I want to be sure the website doesn't look like an iOS app. – Matt Dec 06 '18 at 19:02

1 Answers1

1

The biggest consideration if you are planning on one code base for a website and hybrid app is the Cordova plugins.

Browser support for plugins isn't always the best and you will need to allow for this in your code. You can do this by using the Cordova Device plugin:

https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-device/

You can then use if or switch statements to work around plugins that will work on iOS or Android but won't work in the browser.

Hope this helps.

L Balsdon
  • 995
  • 8
  • 12
  • Thanks a lot for that remark! In my opinion website also should have some specific code for footer, for detecting mobile devices and offer to download mobile app, etc. – Sergey Konov Apr 19 '17 at 09:12