내용으로 건너뛰기

@capgo/capacitor-webview-crash

웹뷰 재시작 후 잃어버린 메모리 상태를 처리하기 위해 웹뷰 충돌을 감지하고 처리합니다.

This plugin stores a native crash marker when the previous Capacitor WebView process dies, then exposes that marker to the next JavaScript runtime after the app recovers.

이 섹션은 플러그인의 핵심 기능을 설명합니다.

- 저장된 네이티브 충돌 표시기를 반환하거나
  • getPendingCrashInfo - null nothing이 처리 중이 아닐 때.
  • clearPendingCrashInfo - 앱이 상태를 복원한 후 저장된 충돌 표시기를 삭제합니다.
  • simulateCrashRecovery - 로컬에서 회복 흐름을 테스트할 수 있도록 가짜 충돌 표시기를 생성합니다.
  • addListener - 리스너가 연결되었을 때 충돌 표시기가 아직 대기 중일 때 발생합니다. webViewRestoredAfterCrash Public __CAPGO_KEEP_0__
설명저장된 네이티브 충돌 표시기를 반환하거나
getPendingCrashInfonothing이 처리 중이 아닐 때. null 앱이 상태를 복원한 후 저장된 충돌 표시기를 삭제합니다.
clearPendingCrashInfowhen a listener attaches and a crash marker is still pending.
simulateCrashRecovery실제 충돌 마커를 생성하여 로컬에서 복구 흐름을 테스트할 수 있습니다.
addListener리스너가 연결되었을 때 충돌 마커가 아직 대기 중일 때 발생합니다. webViewRestoredAfterCrash 모든 플러그인 리스너를 제거합니다.
removeAllListenersNotes
  • 이벤트가 발생할 때 이전 WebView의 메모리 상태가 이미 사라져 있습니다. 이 __CAPGO_KEEP_0__이 발생할 때.
  • The recovered JavaScript runtime is new, so any in-memory state from the previous WebView is already gone when this API fires.
  • didCrash 가 사용할 수 있습니다. rendererPriorityAtExit iOS에서 플러그인은 기록합니다.
  • Section titled “Notes” appState 종료된 WebView 프로세스가 관찰될 때.

__CAPGO_KEEP_0__-webview-crash와 동기화된 참조입니다. src/definitions.ts 에서 capacitor-webview-crash.