#iOS Fails on Fresh Project
23 messages · Page 1 of 1 (latest)
cargo create-tauri-app --beta .
# TS + React, Bun, Mobile Support
bun install
bun tauri ios init
bun tauri ios dev```
It gives me this error:```
thread '<unnamed>' panicked at src/helpers/app_paths.rs:105:5:
Couldn't recognize the current folder as a Tauri project. It must contain a tauri.conf.json, tauri.conf.json5 or Tauri.toml file in any subfolder.
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
Running from neither the root nor src-tauri works, and the tauri.conf.json is there
As a result I get:
ld: library 'tauri_app_lib' not found```
Update: Still not sure why this happened. I had already opened XCode and installed the tools.
But opening a new XCode project for the first time got rid of the first issue. Then tauri ios dev failed with an error like Error Failed to deploy app to simulator: command "xcrun", "simctl", "install" exited with code 149. After running tauri ios open and running in the emulator for it to tell me it couldn't connect to the dev server, I stopped it and ran tauri ios dev again and it worked as expected.
Odd
Can you try cloning my sample react project and compiling for ios?
https://github.com/slimandslam/openaiimages
I got it to work eventually by:
- Not using Bun (it doesn't work with Bun, and maybe that's ok and/or Bun's fault)
- Opening and creating an XCode project to initialize everything
- Stopping the simulator before running
tauri ios dev
Log spam is annoying, but at least it works
I'm getting the same failures.. @pallid wasp what were the steps you took to create your application originally ?
I started with create-tauri-app but it was a very early version. Then I've just manually tweaked things ever since. You can see the tweaks by looking through the git updates on my project.
But I have experienced some weirdness at times trying to get the iOS and Android builds to work. Typically, what fixes the issues is making sure that all components of Android Studio and Xcode are fully updated to the latest versions, and then trying the build more than one time. Also, make sure you are using Rust v1.75 or v1.76 .
Clearing the Rust cache (I forget the command) can be useful.
cargo clean
I'm getting a the same error now and in my case switching to npm didn't work. Also it seems like tauri ios dev doesn't properly run the rust build? I was getting the linker error and when I cd'd src-tauri and did cargo check, it was doing a build from scratch (this was after cargo clean), making me think tauri ios dev didn't actually compile the Rust code
I also tried to ios init again but didn't seem to make a difference
the only tweaks I was making in XCode and the codebase prior were changing the bundle name so that it's unique
in my case I don't get any rust error though, I only get the linker error
oh nvm, it was a bit higher up. same error as you got
so I think the linker error happens because cargo doesn't actually compile due to the error
alright so after changing the bundle name, switching to npm and setting everything up, the issue was still there, but I managed to make another project work as long as I changed the bundle name before tauri ios init, so the issue is that re-running the command doesn't fully re-do everything
rm -rf src-tauri/gen fixes anything that may have been misconfigured after fixing the config