capacitor-splash-screen
БесплатноБез исполняемых скриптовНе проверенConfigures and debugs launch splash screens in Capacitor apps with @capacitor/splash-screen and @capacitor/assets - `launchAutoHide`, `SplashScreen.hide()`…
от Cap-go★ 79 звёзд на GitHubОб этом скилле
Splash Screen in Capacitor
When to Use
TRIGGER when:
- Configuring or regenerating splash / icon assets (
npx capacitor-assets generate) - Splash never disappears, disappears too early, or flashes white/black before the web app paints
- Android 12+ shows a small cropped icon on a solid color instead of the full image
- Upgrading to Capacitor 9 and the Android fade-out animation vanished
- iOS shows a black screen after adding
SceneDelegate.swift(8.5+)
Do not use:
- Status bar / navigation bar styling and edge-to-edge insets:
safe-area-handling - Migrating AppDelegate to SceneDelegate:
capacitor-uiscene-migration - Slow first paint / bundle size:
capacitor-performance - Icon requirements for store submission:
capacitor-app-store
How launch works (decide what to edit)
| Phase | iOS | Android 12+ | Android <= 11 |
|---|---|---|---|
| OS launch screen (before any code) | LaunchScreen.storyboard (UILaunchStoryboardName), image Splash in Assets.xcassets/Splash.imageset |
System SplashScreen API: theme AppTheme.NoActionBarLaunch with Theme.SplashScreen parent - icon + background color only |
androidx.core:core-splashscreen compat, or android:background drawable |
Plugin splash (until hide()) |
Plugin overlay on the bridge view | Same system splash held via the API | Plugin ImageView / Dialog (androidSplashResourceName, androidScaleType) |
Most androidScaleType, showSpinner, splashFullScreen, layoutName, useDialog, backgroundColor options do not apply on Android 12+ launch (the OS draws it). They only affect show() and pre-12 devices.
Workflow
- Inspect:
capacitor.config.*plugins.SplashScreen,android/app/src/main/res/values/styles.xml,android/variables.gradle(coreSplashScreenVersion),ios/App/App/Info.plist,ios/App/App/SceneDelegate.swift,assets/orresources/folder. - Install:
npm install @capacitor/splash-screen && npx cap sync. - Assets: put sources in
assets/(icon-only.png,icon-foreground.png,icon-background.png,splash.png,splash-dark.png; splash >= 2732x2732, icons >= 1024x1024), thennpm install -D @capacitor/assets && npx capacitor-assets generate(--ios,--android,--pwato scope). Keep the logo inside the center ~1/3 so Android 12+ circular masking does not crop it. - Hide deliberately: set
launchAutoHide: falseand callhide()after the first meaningful render (below). - Android 12+ tuning if needed: references/android-12-splash.md.
- Verify (below).
Recommended config
// capacitor.config.ts
plugins: {
SplashScreen: {
launchAutoHide: false, // hide from JS when the UI is ready
launchFadeOutDuration: 200, // explicit: Capacitor 9 default on Android is 0
backgroundColor: '#ffffff', // match the first web paint to avoid a flash
},
},
import { SplashScreen } from '@capacitor/splash-screen';
// after the router's first view has rendered (e.g. in a root component's mounted/useEffect)
await SplashScreen.hide(); // optional: { fadeOutDuration: 300 }
Traps:
- With
launchAutoHide: false, a JS crash beforehide()leaves the app stuck on the splash. Add a fallback:setTimeout(() => SplashScreen.hide(), 8000). - Default when auto-hiding is 500 ms (
launchShowDuration). Long fixed durations hurt perceived startup; hide on readiness instead. - Set
<body>/ root background to the splash background color, or the gap between native splash and first web paint flashes white (dark mode: black). - Live updates (
capgo-live-updates): callnotifyAppReady()independently ofhide(); do not gate one on the other.
Version notes
| Version | Change |
|---|---|
| 4 | Android uses the Android 12 SplashScreen API + compat library |
| 7 | SplashScreenShowOptions / SplashScreenHideOptions types removed -> ShowOptions / HideOptions |
| 8 | coreSplashScreenVersion = '1.2.0' |
| 8.5 (iOS) | UIScene template creates the window and CAPBridgeViewController in SceneDelegate; Main.storyboard no longer supplies the root view controller. LaunchScreen.storyboard is unchanged and still required. |
| 9 | Android launchFadeOutDuration default 200 -> 0 (the old default could block UI changes right after hide()). Set 200 explicitly to keep the fade. |
iOS notes (Capacitor 8.5+ scenes)
- Keep
UILaunchStoryboardName = LaunchScreenin Info.plist. Apple requires a launch storyboard; deleting it causes letterboxed / wrong-size rendering. - Do not add views or a custom view controller to
Main.storyboardexpecting them to show: the 8.5 SceneDelegate setswindow.rootViewController = CAPBridgeViewController()in code. Put a customCAPBridgeViewControllersubclass there instead. - Black screen right after launch with a scene manifest = SceneDelegate creates no window (missing
window = UIWindow(windowScene:)+ `makeKeyAndVisible(
Установить capacitor-splash-screen в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл capacitor-splash-screen?
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.SplashScreen`, `windowSplashScreenAnimatedIcon`), iOS `LaunchScreen.storyboard` + `Splash.imageset`, 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).
Как установить скилл capacitor-splash-screen?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл capacitor-splash-screen запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic