iOS
WKWebView + UIKit host. Assets served via a custom wails:// scheme — no open ports.
Requires macOS with full Xcode.
此内容尚不支持你的语言。
Wails v3 runs on iOS and Android using the same main.go and frontend you already write for desktop. There is no separate mobile project, no code-sharing bridge, and no rewrite: the Go binary is compiled for the mobile target and a native WebView renders your existing frontend.
iOS
WKWebView + UIKit host. Assets served via a custom wails:// scheme — no open ports.
Requires macOS with full Xcode.
Android
Android WebView + WebViewAssetLoader. Go compiled as libwails.so via the NDK.
Works on macOS, Linux, and Windows.
The best way to understand what’s possible is to look at the Kitchen Sink — a single Wails app that runs identically on iOS, Android and desktop from one codebase:
It demonstrates every major mobile API surface across 7 tabs — and it runs on desktop too. The Mobile and Hardware tabs are hidden on desktop via a platform check in the frontend; the Go side registers no handlers for common:* mobile events when built for desktop. This is the recommended pattern for shipping one codebase everywhere.
| Tab | Platforms | What it shows |
|---|---|---|
| Bindings | all | JS → Go service calls returning values, structs, and errors |
| Events | all | Go → JS clock, JS → Go → JS ping/pong, OS system events (battery, network, theme) |
| Dialogs | all | Native message dialogs on each platform |
| System | all | Clipboard, screen metrics, device info |
| Mobile | iOS + Android | Share sheet, keep-awake, torch, brightness, biometrics, local notifications, secure storage |
| Hardware | iOS + Android | Haptics, geolocation, accelerometer, proximity, text-to-speech |
| Native | iOS + Android | iOS: haptics + WKWebView toggles · Android: vibrate + toast |
To run it yourself:
git clone https://github.com/wailsapp/wails.gitcd wails/v3/examples/mobile
wails3 task ios:run # iOS Simulator (macOS + Xcode required)wails3 task android:run # Android Emulatorwails3 task run # DesktopThe same application model applies on every platform:
GOOS=ios and GOOS=android.@wailsio/runtime package works identically; service bindings, events, dialogs and the clipboard all route through the same in-process transport.WKWebView inside a UIViewController; on Android a WebView inside an Activity. Wails wires up the message bridge automatically.Platform-specific behaviour lives in files guarded by //go:build ios or //go:build android, keeping your shared code clean.
| Requirement | iOS | Android |
|---|---|---|
| Operating system | macOS only | macOS, Linux, Windows |
| Toolchain | Full Xcode (not just CLI tools) | Android SDK + NDK 26.3.x + JDK |
| Go | 1.25+ | 1.25+ |
| npm | ✅ | ✅ |
| Verify with | wails3 doctor | wails3 doctor |
Both platforms share the same core feature set:
| Feature | iOS | Android |
|---|---|---|
| Service bindings (JS → Go) | ✅ | ✅ |
| Events (both directions) | ✅ | ✅ |
| Message dialogs | ✅ UIAlertController | ✅ AlertDialog |
| Open file dialogs | ✅ UIDocumentPicker | ✅ Storage Access Framework |
| Save file dialogs | ❌ write to sandbox instead | ❌ write to sandbox instead |
| Clipboard | ✅ UIPasteboard | ✅ ClipboardManager |
| Screens / safe-area metrics | ✅ | ✅ |
| Lifecycle events | ✅ events.IOS.* | ✅ events.Android.* |
| Haptics | ✅ IOS.Haptics.* | ✅ Android.Haptics.Vibrate |
| Device info | ✅ IOS.Device.Info() | ✅ Android.Device.Info() |
| Native tabs (iOS) | ✅ UITabBar | — |
| Toast messages (Android) | — | ✅ Android.Toast.Show |
| Multiple windows | ❌ first window only | ❌ first window only |
| Window geometry / menus / tray | intentional no-ops | intentional no-ops |
Two important rules to know when writing platform-conditional code:
ios implies darwin — a file tagged //go:build darwin will also compile for iOS. To target macOS-only, use //go:build darwin && !ios.android implies linux — a file tagged //go:build linux will also compile for Android. To target desktop-Linux-only, use //go:build linux && !android.At runtime, runtime.GOOS returns "ios" and "android" respectively.
Your First Mobile App
Take a desktop Wails app and run it on iOS Simulator or Android Emulator in minutes.
iOS Guide
Full iOS toolchain setup, simulator, device builds, signing, configuration and API reference.
Android Guide
Full Android SDK/NDK setup, emulator, APK signing, Play Store packaging and API reference.