tauri-docs
tauri-docs copied to clipboard
document that iOS and macos devices must be on the same local network for development.
Describe the bug
If you run the application in the Xcode Simulator - pnpm tauri ios dev "iPhone 16 Pro", then everything works fine.
But when connecting a physical iPhone by wire and launching pnpm tauri ios dev, the application is successfully builded and installed, but when opened, only a black screen is displayed and nothing more.
After a while, the message "error sending request" appears.
Reproduction
- Install a clean Tauri Vue.js application.
- Launch the application in Xcode Simulator, make sure that everything is working well.
- Set up all sorts of crap like Apple Team ID, certificate, etc.
- Run
tauri ios devon a physical iPhone.
Expected behavior
The app will be displayed on the phone.
Full tauri info output
[✔] Environment
- OS: Mac OS 15.4.1 arm64 (X64)
✔ Xcode Command Line Tools: installed
✔ rustc: 1.87.0 (17067e9ac 2025-05-09)
✔ cargo: 1.87.0 (99624be96 2025-05-06)
✔ rustup: 1.28.2 (e4f3ad6f8 2025-04-28)
✔ Rust toolchain: stable-aarch64-apple-darwin (default)
- node: 24.2.0
- pnpm: 10.10.0
- npm: 11.3.0
[-] Packages
- tauri 🦀: 2.5.1
- tauri-build 🦀: 2.2.0
- wry 🦀: 0.51.2
- tao 🦀: 0.33.0
- @tauri-apps/api : 2.5.0
- @tauri-apps/cli : 2.5.0
[-] Plugins
- tauri-plugin-opener 🦀: 2.3.0
- @tauri-apps/plugin-opener : 2.3.0
[-] App
- build-type: bundle
- CSP: unset
- frontendDist: ../dist
- devUrl: http://localhost:1420/
- framework: Vue.js
- bundler: Vite
[-] iOS
- Developer Teams: *****
Stack trace
Additional context
No response
What happens if you close the app and re-open it (without restarting the ios dev process)? I almost exclusively use real devices and i didn't see this error for a looong while.
What happens if you close the app and re-open it (without restarting the ios dev process)? I almost exclusively use real devices and i didn't see this error for a looong while.
https://drive.google.com/file/d/13hXjILleLHZEaJTJGoVISY_2L6QB4Zih/view?usp=sharing
boba - clean Tauri Vue.js application.
@FabianLars I managed to fix the problem. All had to do was connect Mac and iPhone to the same wifi network. Then the window "Allow the boba application to find devices on local networks" appeared, I clicked "Allow", re-open application and everything worked.
However, I don't quite understand why it works that way....
The frontend is hosted on the local network so that makes sense. As far as i know there's no similar thing to android's adb forwarding (which should work even if the devices are not on the same network) in iOS so we have to rely on that.
I think we could do a better job at documenting this requirement. We're quite close to the topic here and here but not quite.