Learn-skills.dev tauri2-mobile
Expert guidance for developing, testing, and deploying mobile applications with Tauri 2. Use when working with Tauri 2 mobile development for Android/iOS, including project setup, Rust backend patterns, frontend integration, plugin usage (biometric, geolocation, notifications, IAP), emulator/ADB testing, code signing, and Play Store/App Store deployment.
install
source · Clone the upstream repo
git clone https://github.com/NeverSight/learn-skills.dev
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/acaprino/alfio-claude-plugins/tauri2-mobile" ~/.claude/skills/neversight-learn-skills-dev-tauri2-mobile && rm -rf "$T"
manifest:
data/skills-md/acaprino/alfio-claude-plugins/tauri2-mobile/SKILL.mdsource content
Tauri 2 Mobile Development
Build cross-platform mobile apps with Tauri 2 using web technologies (HTML/CSS/JS) for UI and Rust for native backend.
Quick Reference
| Task | Command |
|---|---|
| Init mobile | / |
| Dev Android | |
| Dev iOS | |
| Build APK | |
| Build AAB | |
| Build iOS | |
| Add plugin | |
Workflow Decision Tree
New Project Setup
- Read references/setup.md for environment configuration
- Run
with mobile targetsnpm create tauri-app@latest - Configure
with app identifiertauri.conf.json
Adding Features
- Native functionality: Read references/plugins.md
- Rust commands/state: Read references/rust-patterns.md
- Frontend integration: Read references/frontend-patterns.md
- Authentication/OAuth: Read references/authentication.md
- In-app purchases: Read references/iap.md
Testing
- Emulator/ADB debug: Read references/testing.md
- Use
for logsadb logcat | grep -iE "(tauri|RustStdout)"
Building & Deployment
- Code signing & stores: Read references/build-deploy.md
- CI/CD pipelines: Read references/ci-cd.md
Project Structure
my-app/ ├── src/ # Frontend ├── src-tauri/ │ ├── Cargo.toml │ ├── tauri.conf.json # Main config │ ├── src/ │ │ ├── main.rs # Desktop entry (don't modify) │ │ └── lib.rs # Main code + mobile entry │ ├── capabilities/ │ │ └── default.json # Permissions │ └── gen/ │ ├── android/ # Android Studio project │ └── apple/ # Xcode project
Essential Configuration
tauri.conf.json
{ "$schema": "https://schema.tauri.app/config/2", "productName": "MyApp", "identifier": "com.company.myapp", "bundle": { "iOS": { "minimumSystemVersion": "14.0" }, "android": { "minSdkVersion": 24 } } }
capabilities/default.json
{ "identifier": "default", "windows": ["main"], "permissions": ["core:default"] }
lib.rs (Mobile Entry)
#[cfg_attr(mobile, tauri::mobile_entry_point)] pub fn run() { tauri::Builder::default() .plugin(tauri_plugin_opener::init()) .plugin(tauri_plugin_deep_link::init()) .invoke_handler(tauri::generate_handler![greet]) .run(tauri::generate_context!()) .expect("error"); } #[tauri::command] fn greet(name: &str) -> String { format!("Hello, {}!", name) }
Common Issues
| Problem | Solution |
|---|---|
| White screen | Check JS console, verify , check capabilities |
| iOS won't connect | Use , select IPv6 |
| INSTALL_FAILED_ALREADY_EXISTS | |
| Emulator not detected | Verify , restart ADB |
| HMR not working | Configure with |
| Shell plugin URL error | Use plugin instead () |
| Google OAuth fails | Google blocks WebView; use system browser flow |
| Deep link not received | Check scheme in tauri.conf.json, init plugin |
| Safe area CSS fails on Android | not supported in WebView; use JS fallback |
| Windows APK build symlink error | Enable Developer Mode or copy .so files manually |
See references/testing.md for detailed troubleshooting.
Resources
- Docs: https://v2.tauri.app
- Plugins: https://v2.tauri.app/plugin/
- GitHub: https://github.com/tauri-apps/tauri