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:
I am not too acquainted with Capacitor outdoors of the docs and some reddit options so something and any assistance is appreciated!
