sveltekit-capacitor-starter Svelte Themes

Sveltekit Capacitor Starter

A starter project that implemente SvelteKit and Capacitor

SvelteKit Capacitor starter

Presentation

See this presentation that was given on This Week in Svelte:

YouTube Presentation link

Presentation link

This is a simple demo project of SvelteKit + Capacitor. It is not a complete starter but more of an example of a Capacitor setup.

To add all the functionality, copy the contents of demo/complete/+page.svelte to src/routes/+page.svelte.

This demo only has iOS added to the project. Android can optionally be added via the instructions in the Capacitor documentation.

Basic steps:

  1. Follow the setup guide for setting up your environment under iOS
  2. Edit capacitor.config.ts, under server.url, add your local IP address.
  3. Perform the commands below
nvm use
npm i
npm run dev
  1. Start XCode and open the /ios folder in it via the "Open a project or file" button of the start screen.
  2. Start the app either on a physical device or on an emulator via the Run ("Play") button

Automating building of iOS/Android bundles via GitHub Actions

See these blog posts:

Further reading

Top categories

Loading Svelte Themes