Capacitor plugin (v1.2.0) to migrate legacy localStorage data from UIWebView (iOS) and Crosswalk WebView (Android) to modern Capacitor WebViews. Supports both Crosswalk SQLite and system WebView LevelDB formats. Preserves original database files for safety and allows retry. Peer dep on @capacitor/core >=7.0.0. Ships TypeScript types. Released ~2023, no active development observed. Key differentiator: handles both SQLite and LevelDB, uses hidden WebView for reliable LevelDB access.
npm install capacitor-localstorage-migrationNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Complete migration of legacy localStorage from old WebViews, with completion flag to avoid re-runs.
Update @capacitor/core to version 7 or later.
Wrap calls in platform checks: import { Capacitor } from '@capacitor/core'; if (Capacitor.isNativePlatform()) { ... }Use Object.keys(data).length > 0 to test for existence of data.
For WKWebView data persistence, use standard localStorage or a different migration strategy.
Check returned data length; if zero, consider alternative migration paths.
Change to: import { LocalStorageMigration } from 'capacitor-localstorage-migration'Guard with platform check: if (Capacitor.isNativePlatform()) { ... }Run 'npx cap sync' after installing the plugin.