8.7 C
Canberra
Monday, October 27, 2025

construct – SvelteKit + Capacitor: Photos and Audio Not Loading in iOS Simulator


I am engaged on a SvelteKit challenge with Capacitor to construct a cell app. The app ought to show photos and play audio information. Every thing works nice within the browser, however once I run the app within the iOS simulator, the photographs and audio information don’t load. I can see the names of the audio observe, go to the subsequent observe I’ve loaded and see the names of the photographs within the dropdown however no performance from both.

Venture Setup:

  • SvelteKit: Utilizing @sveltejs/adapter-static
  • Capacitor: For constructing the cell app
  • Construct Instrument: Vite

svelte.config.js:

import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';

/** @kind {import('@sveltejs/equipment').Config} */
const config = {
    preprocess: vitePreprocess(),
    equipment: {
        adapter: adapter({
            pages: 'construct',
            property: 'construct',
            fallback: 'index.html'
        }),
        prerender: { entries: [] }
    }
};

export default config;

capacitor.config.ts:

import kind { CapacitorConfig } from '@capacitor/cli';

const config: CapacitorConfig = {
    appId: 'com.instance.app',
    appName: 'player2',
    webDir: 'construct'
};

export default config;

src/routes/+format.js:

export const prerender="auto";

Related code:



"cd

I am not too acquainted with Capacitor outdoors of the docs and some reddit options so something and any assistance is appreciated!

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

[td_block_social_counter facebook="tagdiv" twitter="tagdivofficial" youtube="tagdiv" style="style8 td-social-boxed td-social-font-icons" tdc_css="eyJhbGwiOnsibWFyZ2luLWJvdHRvbSI6IjM4IiwiZGlzcGxheSI6IiJ9LCJwb3J0cmFpdCI6eyJtYXJnaW4tYm90dG9tIjoiMzAiLCJkaXNwbGF5IjoiIn0sInBvcnRyYWl0X21heF93aWR0aCI6MTAxOCwicG9ydHJhaXRfbWluX3dpZHRoIjo3Njh9" custom_title="Stay Connected" block_template_id="td_block_template_8" f_header_font_family="712" f_header_font_transform="uppercase" f_header_font_weight="500" f_header_font_size="17" border_color="#dd3333"]
- Advertisement -spot_img

Latest Articles