import { registerPlugin } from '@capacitor/core'; import { isAndroidPlatform } from '../utils/capacitor'; interface LaunchSplashPlugin { ready(): Promise; } const plugin = registerPlugin('LaunchSplash', { web: { ready: async () => undefined, }, }); let didRelease = false; export const launchSplash = { ready(): Promise { if (didRelease || !isAndroidPlatform()) return Promise.resolve(); didRelease = true; return plugin.ready().catch(() => undefined); }, };