{"slug":"capacitor-splash-screen-2","title":"capacitor-splash-screen","summary":"Configures and debugs launch splash screens in Capacitor apps with @capacitor/splash-screen and @capacitor/assets - `launchAutoHide`, `SplashScreen.hide()`, `launchFadeOutDuration` (Android default changed 200 -> 0 in Capacitor 9), Android 12+ SplashScreen API theme (`Theme.Splas","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-12-05T18:17:27.846021Z","repo":{"url":"https://github.com/Cap-go/capgo-skills","stars":79,"forks":4,"license":"MIT","updatedAt":"2026-12-05T16:44:30Z"},"bodyHtml":"<hr>\n<h2>name: capacitor-splash-screen\ndescription: Configures and debugs launch splash screens in Capacitor apps with @capacitor/splash-screen and @capacitor/assets - <code>launchAutoHide</code>, <code>SplashScreen.hide()</code>, <code>launchFadeOutDuration</code> (Android default changed 200 -&gt; 0 in Capacitor 9), Android 12+ SplashScreen API theme (<code>Theme.SplashScreen</code>, <code>windowSplashScreenAnimatedIcon</code>), iOS <code>LaunchScreen.storyboard</code> + <code>Splash.imageset</code>, and Capacitor 8.5 UIScene/SceneDelegate effects (window created in code, Main.storyboard no longer supplies the root view controller). Use for white/black flash at launch, splash never hiding, cropped/tiny Android 12 icon, dark-mode splash, or regenerating icons and splash assets. Do not use for status/navigation bar color and insets (safe-area-handling), the UIScene migration itself (capacitor-uiscene-migration), or startup performance profiling (capacitor-performance).</h2>\n<h1>Splash Screen in Capacitor</h1>\n<h2>When to Use</h2>\n<p>TRIGGER when:</p>\n<ul>\n<li>Configuring or regenerating splash / icon assets (<code>npx capacitor-assets generate</code>)</li>\n<li>Splash never disappears, disappears too early, or flashes white/black before the web app paints</li>\n<li>Android 12+ shows a small cropped icon on a solid color instead of the full image</li>\n<li>Upgrading to Capacitor 9 and the Android fade-out animation vanished</li>\n<li>iOS shows a black screen after adding <code>SceneDelegate.swift</code> (8.5+)</li>\n</ul>\n<p>Do not use:</p>\n<ul>\n<li>Status bar / navigation bar styling and edge-to-edge insets: <code>safe-area-handling</code></li>\n<li>Migrating AppDelegate to SceneDelegate: <code>capacitor-uiscene-migration</code></li>\n<li>Slow first paint / bundle size: <code>capacitor-performance</code></li>\n<li>Icon requirements for store submission: <code>capacitor-app-store</code></li>\n</ul>\n<h2>How launch works (decide what to edit)</h2>\n<table>\n<thead>\n<tr>\n<th>Phase</th>\n<th>iOS</th>\n<th>Android 12+</th>\n<th>Android &lt;= 11</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>OS launch screen (before any code)</td>\n<td><code>LaunchScreen.storyboard</code> (<code>UILaunchStoryboardName</code>), image <code>Splash</code> in <code>Assets.xcassets/Splash.imageset</code></td>\n<td>System SplashScreen API: theme <code>AppTheme.NoActionBarLaunch</code> with <code>Theme.SplashScreen</code> parent - icon + background color only</td>\n<td><code>androidx.core:core-splashscreen</code> compat, or <code>android:background</code> drawable</td>\n</tr>\n<tr>\n<td>Plugin splash (until <code>hide()</code>)</td>\n<td>Plugin overlay on the bridge view</td>\n<td>Same system splash held via the API</td>\n<td>Plugin ImageView / Dialog (<code>androidSplashResourceName</code>, <code>androidScaleType</code>)</td>\n</tr>\n</tbody>\n</table>\n<p>Most <code>androidScaleType</code>, <code>showSpinner</code>, <code>splashFullScreen</code>, <code>layoutName</code>, <code>useDialog</code>, <code>backgroundColor</code> options do <strong>not</strong> apply on Android 12+ launch (the OS draws it). They only affect <code>show()</code> and pre-12 devices.</p>\n<h2>Workflow</h2>\n<ol>\n<li><strong>Inspect</strong>: <code>capacitor.config.*</code> <code>plugins.SplashScreen</code>, <code>android/app/src/main/res/values/styles.xml</code>, <code>android/variables.gradle</code> (<code>coreSplashScreenVersion</code>), <code>ios/App/App/Info.plist</code>, <code>ios/App/App/SceneDelegate.swift</code>, <code>assets/</code> or <code>resources/</code> folder.</li>\n<li><strong>Install</strong>: <code>npm install @capacitor/splash-screen &amp;&amp; npx cap sync</code>.</li>\n<li><strong>Assets</strong>: put sources in <code>assets/</code> (<code>icon-only.png</code>, <code>icon-foreground.png</code>, <code>icon-background.png</code>, <code>splash.png</code>, <code>splash-dark.png</code>; splash &gt;= 2732x2732, icons &gt;= 1024x1024), then <code>npm install -D @capacitor/assets &amp;&amp; npx capacitor-assets generate</code> (<code>--ios</code>, <code>--android</code>, <code>--pwa</code> to scope). Keep the logo inside the center ~1/3 so Android 12+ circular masking does not crop it.</li>\n<li><strong>Hide deliberately</strong>: set <code>launchAutoHide: false</code> and call <code>hide()</code> after the first meaningful render (below).</li>\n<li><strong>Android 12+ tuning</strong> if needed: <a href=\"references/android-12-splash.md\">references/android-12-splash.md</a>.</li>\n<li><strong>Verify</strong> (below).</li>\n</ol>\n<h2>Recommended config</h2>\n<pre><code>// capacitor.config.ts\nplugins: {\n  SplashScreen: {\n    launchAutoHide: false,     // hide from JS when the UI is ready\n    launchFadeOutDuration: 200, // explicit: Capacitor 9 default on Android is 0\n    backgroundColor: '#ffffff', // match the first web paint to avoid a flash\n  },\n},\n</code></pre>\n<pre><code>import { SplashScreen } from '@capacitor/splash-screen';\n\n// after the router's first view has rendered (e.g. in a root component's mounted/useEffect)\nawait SplashScreen.hide(); // optional: { fadeOutDuration: 300 }\n</code></pre>\n<p>Traps:</p>\n<ul>\n<li>With <code>launchAutoHide: false</code>, a JS crash before <code>hide()</code> leaves the app stuck on the splash. Add a fallback: <code>setTimeout(() =&gt; SplashScreen.hide(), 8000)</code>.</li>\n<li>Default when auto-hiding is 500 ms (<code>launchShowDuration</code>). Long fixed durations hurt perceived startup; hide on readiness instead.</li>\n<li>Set <code>&lt;body&gt;</code> / root background to the splash background color, or the gap between native splash and first web paint flashes white (dark mode: black).</li>\n<li>Live updates (<code>capgo-live-updates</code>): call <code>notifyAppReady()</code> independently of <code>hide()</code>; do not gate one on the other.</li>\n</ul>\n<h2>Version notes</h2>\n<table>\n<thead>\n<tr>\n<th>Version</th>\n<th>Change</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>4</td>\n<td>Android uses the Android 12 SplashScreen API + compat library</td>\n</tr>\n<tr>\n<td>7</td>\n<td><code>SplashScreenShowOptions</code> / <code>SplashScreenHideOptions</code> types removed -&gt; <code>ShowOptions</code> / <code>HideOptions</code></td>\n</tr>\n<tr>\n<td>8</td>\n<td><code>coreSplashScreenVersion = '1.2.0'</code></td>\n</tr>\n<tr>\n<td>8.5 (iOS)</td>\n<td>UIScene template creates the window and <code>CAPBridgeViewController</code> in <code>SceneDelegate</code>; <code>Main.storyboard</code> no longer supplies the root view controller. <code>LaunchScreen.storyboard</code> is unchanged and still required.</td>\n</tr>\n<tr>\n<td>9</td>\n<td>Android <code>launchFadeOutDuration</code> default <code>200</code> -&gt; <code>0</code> (the old default could block UI changes right after <code>hide()</code>). Set <code>200</code> explicitly to keep the fade.</td>\n</tr>\n</tbody>\n</table>\n<h2>iOS notes (Capacitor 8.5+ scenes)</h2>\n<ul>\n<li>Keep <code>UILaunchStoryboardName = LaunchScreen</code> in Info.plist. Apple requires a launch storyboard; deleting it causes letterboxed / wrong-size rendering.</li>\n<li>Do not add views or a custom view controller to <code>Main.storyboard</code> expecting them to show: the 8.5 SceneDelegate sets <code>window.rootViewController = CAPBridgeViewController()</code> in code. Put a custom <code>CAPBridgeViewController</code> subclass there instead.</li>\n<li>Black screen right after launch with a scene manifest = SceneDelegate creates no window (missing <code>window = UIWindow(windowScene:)</code> + <code>makeKeyAndVisible()</code>) or <code>UISceneDelegateClassName</code> points to a missing class. Fix with <code>capacitor-uiscene-migration</code>.</li>\n<li>The storyboard is cached by iOS. After changing it, delete the app from the device/simulator and reinstall.</li>\n<li>On resizable windows / iPad / foldables the launch storyboard must use Auto Layout constraints, not fixed frames (see <code>capacitor-ios-resizability</code> if present).</li>\n</ul>\n<h2>Verification</h2>\n<ol>\n<li><code>npx cap sync</code> then a clean native build (<code>Product &gt; Clean Build Folder</code> in Xcode; <code>./gradlew clean</code> in <code>android/</code>).</li>\n<li>Delete and reinstall the app (both platforms cache launch screens).</li>\n<li>Cold launch on: iOS device light + dark mode, Android 12+ device, Android &lt;= 11 emulator (if minSdk allows; Capacitor 9 minSdk is 26).</li>\n<li>Confirm: no white/black flash, splash hides once the first screen is visible, fade matches the configured duration.</li>\n<li>Grep for leftovers:</li>\n</ol>\n<pre><code>grep -rn \"launchFadeOutDuration\\|launchAutoHide\" capacitor.config.*\ngrep -n \"Theme.SplashScreen\\|postSplashScreenTheme\" android/app/src/main/res/values/styles.xml\n/usr/libexec/PlistBuddy -c \"Print :UILaunchStoryboardName\" ios/App/App/Info.plist\n</code></pre>\n<h2>Error Handling</h2>\n<table>\n<thead>\n<tr>\n<th>Symptom / message</th>\n<th>Cause</th>\n<th>Fix</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Splash stays forever</td>\n<td><code>launchAutoHide: false</code> and <code>hide()</code> never runs (JS error, wrong import, called before plugin load)</td>\n<td>Check web console; add timeout fallback</td>\n</tr>\n<tr>\n<td>Fade-out gone after Capacitor 9 upgrade (Android)</td>\n<td>Default <code>launchFadeOutDuration</code> is now 0</td>\n<td>Set <code>launchFadeOutDuration: 200</code></td>\n</tr>\n<tr>\n<td>UI changes right after <code>hide()</code> not visible (Android, pre-9)</td>\n<td>200 ms fade blocked updates</td>\n<td>Set <code>launchFadeOutDuration: 0</code></td>\n</tr>\n<tr>\n<td>Android 12+ shows small icon, image cropped</td>\n<td>OS splash is icon-only by design</td>\n<td>Provide adaptive icon-safe artwork; tune <code>windowSplashScreenAnimatedIcon</code></td>\n</tr>\n<tr>\n<td>Android 12/12L no splash from third-party launchers or Android Studio</td>\n<td>Platform bug fixed in Android 13</td>\n<td>Test from the stock launcher</td>\n</tr>\n<tr>\n<td><code>error: resource drawable/splash not found</code></td>\n<td><code>androidSplashResourceName</code> or styles reference a missing drawable</td>\n<td>Regenerate assets or fix the name in both config and <code>styles.xml</code></td>\n</tr>\n<tr>\n<td><code>AAPT: error: style attribute 'attr/windowSplashScreenAnimatedIcon' not found</code></td>\n<td><code>core-splashscreen</code> dependency missing</td>\n<td>Restore <code>implementation \"androidx.core:core-splashscreen:$coreSplashScreenVersion\"</code></td>\n</tr>\n<tr>\n<td>iOS black screen after 8.5 scene adoption</td>\n<td>No window created in SceneDelegate</td>\n<td>See iOS notes / <code>capacitor-uiscene-migration</code></td>\n</tr>\n<tr>\n<td>Old splash still shows on iOS</td>\n<td>Launch screen cache</td>\n<td>Delete app, reboot device if needed, reinstall</td>\n</tr>\n</tbody>\n</table>\n<h2>Resources</h2>\n<ul>\n<li>Plugin API: <a href=\"https://capacitorjs.com/docs/apis/splash-screen\">https://capacitorjs.com/docs/apis/splash-screen</a></li>\n<li>Splash screens and icons guide: <a href=\"https://capacitorjs.com/docs/guides/splash-screens-and-icons\">https://capacitorjs.com/docs/guides/splash-screens-and-icons</a></li>\n<li>Updating to 9.0: <a href=\"https://capacitorjs.com/docs/updating/9-0\">https://capacitorjs.com/docs/updating/9-0</a></li>\n<li>Android SplashScreen API: <a href=\"https://developer.android.com/develop/ui/views/launch/splash-screen\">https://developer.android.com/develop/ui/views/launch/splash-screen</a></li>\n</ul>\n","files":[{"path":"metadata.json","sizeBytes":874,"isText":true},{"path":"references/android-12-splash.md","sizeBytes":1710,"isText":true},{"path":"SKILL.md","sizeBytes":8804,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-12-05T18:19:42.2983Z","sha256":"8BFA2E544F3D19B64D1E9B702BDBA7FBA671688EE15CB49FB21B3194E6512F91","sizeBytes":5151},"review":null,"source":{"repositoryUrl":"https://github.com/Cap-go/capgo-skills","path":"skills/capacitor-splash-screen","license":"MIT","commit":"76462e3a0041ee8dd0d370c344d9fd3ae2c29cdb","subtreeSha":"C8989D9AAFEA71AFCEC77236ADD15257468CD88773A6857350175F5FCD7A1E28","lastSyncedAt":"2026-12-05T18:17:06.651351Z"},"reviewedAt":"2026-12-05T18:23:35.811272Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/Cap-go/capgo-skills/tree/main/skills/capacitor-splash-screen"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install cap-go-capgo-skills@llmmart"},{"target":"git","command":"git clone https://github.com/Cap-go/capgo-skills.git"}]}