Skip to content

/desktop-mobile-tauri

Tauri 2.x mobile development - iOS via WKWebView, Android via Android WebView, mobile plugins, Swift/Kotlin native code, permissions, debugging

shell
$ npx -y skills add agents-inc/skills --skill desktop-mobile-tauri --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/desktop-mobile-tauri
How auto-invocation works

Context preview

The summary Claude sees to decide when to auto-load this skill.

Tauri 2.x mobile development - iOS via WKWebView, Android via Android WebView, mobile plugins, Swift/Kotlin native code, permissions, debugging

SKILL.md

desktop-mobile-tauri.SKILL.md
name: desktop-mobile-tauri
description: Tauri 2.x mobile development - iOS via WKWebView, Android via Android WebView, mobile plugins, Swift/Kotlin native code, permissions, debugging

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 with `tauri 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 extending `Plugin` on iOS and Kotlin classes annotated with `@TauriPlugin` on 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)**

**(You MUST run mobile dev commands (`tauri ios dev`, `tauri android dev`) instead of `tauri dev` for mobile targets -- `tauri dev` only targets desktop)**

</critical_requirements>

---

**Auto-detection:** tauri android init, tauri ios init, tauri android dev, tauri ios dev, tauri-plugin-biometric, tauri-plugin-barcode-scanner, tauri-plugin-nfc, tauri-plugin-haptics, tauri-plugin-geolocation, #[cfg(mobile)], #[cfg(target_os = "android")], #[cfg(target_os = "ios")], mobile_entry_point, Info.plist, Info.ios.plist, AndroidManifest.xml, NSCameraUsageDescription, NSFaceIDUsageDescription, NSLocationWhenInUseUsageDescription, @TauriPlugin, Plugin Swift class, WKWebView, Invoke, InvokeArg, run_mobile_plugin, develop-mobile

**When to use:**

  • Adding iOS or Android targets to a Tauri 2.x project
  • Using mobile-specific plugins (biometric auth, barcode scanner, NFC, haptics, geolocation)
  • Writing custom native plugin code in Swift (iOS) or Kotlin (Android)
  • Configuring mobile platform permissions and capabilities
  • Debugging on mobile simulators/emulators or physical devices
  • Writing platform-conditional Rust code for mobile vs desktop

**When NOT to use:**

  • Desktop-only Tauri development (use the desktop-framework-tauri skill)
  • General Tauri concepts (commands, IPC, events, permissions, window management -- desktop skill covers these)
  • Frontend framework patterns (component architecture, state management -- use respective framework skills)
  • General Rust programming not related to Tauri mobile APIs

**Key patterns covered:**

  • Mobile project initialization and prerequisites ([examples/core.md](examples/core.md))
  • Mobile-specific plugin registration with `#[cfg(mobile)]` ([examples/core.md](examples/core.md))
  • Mobile plugin gallery: biometric, barcode-scanner, NFC, haptics, geolocation ([examples/plugins.md](examples/plugins.md))
  • Custom Swift plugin development for iOS ([examples/native-plugins.md](examples/native-plugins.md))
  • Custom Kotlin plugin development for Android ([examples/native-plugins.md](examples/native-plugins.md))
  • Platform permissions: Info.plist, AndroidManifest.xml ([examples/core.md](examples/core.md))
  • Mobile debugging: Safari Web Inspector, Chrome DevTools, logcat ([examples/core.md](examples/core.md))

**Detailed resources:**

  • [examples/core.md](examples/core.md) - Project setup, mobile plugin registration, permissions, platform-conditional code, debugging
  • [examples/plugins.md](examples/plugins.md) - Mobile-specific plugins (biometric, barcode, NFC, haptics, geolocation)
  • [examples/native-plugins.md](examples/native-plugins.md) - Custom Swift and Kotlin plugin development, calling Rust from mobile
  • [reference.md](reference.md) - CLI commands, prerequisites checklist, mobile plugin registry, permission reference

---

<philosophy>

Philosophy

Tauri mobile extends the same Rust backend + webview frontend architecture to iOS and Android. The key difference: mobile apps run in the OS native webview (WKWebView on iOS, Android WebView on Android) and can access device hardware through mobile-specific plugins. Your existing Tauri desktop code (commands, state, events) works on mobile without changes -- you add mobile support incrementally.

**When Tauri mobile is the right choice:**

  • You already have a Tauri desktop app and want to share the codebase with mobile
  • You want a single codebase for desktop + mobile with web frontend skills
  • You need native device features (camera, biometrics, NFC) accessible via plugins
  • You want small app sizes compared to alternatives that bundle their own webview

**When Tauri mobile may NOT be the right choice:**

  • You need pixel-perfect native UI (Tauri renders web content, not native widgets)
  • You need features that require a consistent browser engine (Tauri uses the OS webview, which varies)
  • Your app is mobile-only with no desktop plans (native mobile frameworks may be more appropriate)
  • You need advanced mobile-specific APIs not yet covered by Tauri plugins

</philosophy>

---

<patterns>

Core Patterns

Pattern 1: Mobile Project Initialization

Initialize mobile targets in an existing Tauri project. Each platform requires its own init step.

# Initialize Android target (generates gen/android/ project)
npx tauri android init

# Initialize iOS target (generates gen/apple/ projec
Read more
Read it on GitHub ↗

Showing the first part of this file.

Ships withagents-inc-skills

The official skills marketplace for Agents Inc. 150+ skills covering everything from React and Prisma to Redis, ElevenLabs, and infrastructure tooling. Pick the skills that match your stack and install them via Claude Code. Need more control?

Get the whole plugin, auto-invoked