desktop-mobile-tauri
Tauri 2.x Mobile Development
Quick Guide: Tauri 2.x supports iOS (WKWebView) and Android (Android WebView) from the same codebase as desktop. Initialize with
tauri android init/tauri ios init, run withtauri android dev/tauri ios dev. Mobile-only plugins (biometric, barcode-scanner, NFC, haptics, geolocation) use#[cfg(mobile)]for conditional registration. Custom native code uses Swift classes extendingPluginon iOS and Kotlin classes annotated with@TauriPluginon Android. Every mobile plugin needs platform permissions (Info.plist keys on iOS, AndroidManifest.xml permissions on Android) in addition to Tauri capability grants.Current version: Tauri 2.x (stable). Mobile support is production-ready since Tauri 2.0 (2024).
<critical_requirements>
CRITICAL: Before Using This Skill
All code must follow project conventions in CLAUDE.md (kebab-case, named exports, import ordering,
import type, named constants)
(You MUST use #[cfg(mobile)] when registering mobile-only plugins -- registering them unconditionally breaks desktop builds)
(You MUST add platform permissions (Info.plist on iOS, AndroidManifest.xml on Android) in ADDITION to Tauri capability file permissions -- missing platform permissions cause silent failures or runtime crashes)
(You MUST use #[cfg_attr(mobile, tauri::mobile_entry_point)] on pub fn run() -- without it, the app cannot launch on mobile)