2

I'm looking to use C# Xamarin together with SvelteKit to create a multiplatform app that will run in a native web view as well as in a browser.

How do I go about using SvelteKit to create an app for the WebView? I'd like to download all the required parts of the web app onto the device and run those files inside a WebView, so that the GUI and the app are available offline.

Maybe there's a built in sveltekit command for this, or maybe I just copy the files from the normal build?

Also what's the best way to figure out whether the app is running in a webview or a browser?

TeabagD
  • 569
  • 6
  • 17
  • Webview: https://stackoverflow.com/questions/37591279/detect-if-user-is-using-webview-for-android-ios-or-a-regular-browser – dummdidumm Aug 31 '21 at 10:00
  • 1
    Generating the app: Have a look at adapter-static, you can create SPAs with it. – dummdidumm Aug 31 '21 at 10:00
  • Looks like exactly what I'm looking for is not currently available for SvelteKit. https://github.com/sveltejs/kit/issues/907. But adapter-static is the closes option I have, so thanks a lot for that. – TeabagD Aug 31 '21 at 12:29
  • Keep it simple, make it easy for your viewers? Progressive Web App (PWA) in Sveltekit. Responsive for mobile and desktop. Less work for you too. – zipzit Sep 04 '21 at 16:16

0 Answers0