#iOS Fails on Fresh Project

23 messages · Page 1 of 1 (latest)

upper solar
#

iOS builds don't seem to be working on a fresh installation of tauri-cli and a new project created from create-tauri-app. I'll post more info below.

#
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```
upper solar
#

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

pallid wasp
upper solar
#

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

chrome halo
pallid wasp
# chrome halo I'm getting the same failures.. <@355424690833195008> what were the steps you t...

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.

night plover
#

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