Open venkr opened 4 months ago
I've gotten past this error, not sure if I recall what I did anymore though..
I'm now stuck at an error that seems to be this one: https://github.com/tauri-apps/cargo-mobile2/issues/291
May also be related to this one: https://github.com/tauri-apps/cargo-mobile2/issues/252
Alright, more details incoming:
I'm able to successfully tauri ios init
- but tauri ios dev
fails with:
Error [tauri_cli] Failed to run cargo build: command ["cargo", "build", "--package", "limitless-app", "--manifest-path", "/Users/venki/src/r2/apps/limitless/ts/src-tauri/Cargo.toml", "--target", "aarch64-apple-ios", "--features", "tauri/rustls-tls", "--lib", "--no-default-features"] exited with code 101
In order to further diagnose it, I manually run the cargo build
command:
cargo build --package limitless-app --manifest-path Cargo.toml --target aarch64-apple-ios --features tauri/rustls-tls --lib --no-default-features
Then, I get a more informative set of errors:
error: linking with
ccfailed: exit status: 1
The specific error seems to be:
ld: building for 'iOS', but linking in object file (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libswiftCompatibility51.a[arm64][6](Overrides.cpp.o)) built for 'zippered(macOS/Catalyst)'
Which is the same as (https://github.com/tauri-apps/cargo-mobile2/issues/252, https://github.com/tauri-apps/cargo-mobile2/issues/291)
Here are more details of my exact flow:
server
info, incl host
and port
bundle.iOS
info - developmentTeam
#[cfg(any(target_os = "macos", target_os = "windows"))]
)So, I decided to try out the potential fix from: https://github.com/tauri-apps/cargo-mobile2/pull/272
I ran the following steps:
tauri-apps/cargo-mobile2
, cherry-pick the fix from the PR onto it, push it to a repo (https://github.com/rewindai/cargo-mobile2)tauri-apps/tauri
- and within tooling/cli/Cargo.toml
switch to depending on the fork version of cargo-mobile2
cargo install --path .
pnpm tauri ios init
and pnpm tauri ios dev
flow from scratch, but using this locally built cargo-tauri
that depends on the forked cargo-mobile2
instead.That did not fix anything either, I still run into the same issue:
ld: building for 'iOS', but linking in object file (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx/libswiftCompatibility51.a[arm64][6](Overrides.cpp.o)) built for 'zippered(macOS/Catalyst)
Open to any further ideas on how I'd get this working on iOS - looks like the place I'm stuck at is it seems to incorrectly be linking in something from my host platform.
Describe the bug
I'm trying to build an existing macOS + Windows Tauri app for iOS as well. I did this by running
pnpm tauri ios init
andpnpm tauri ios dev
.However, I run into:
One note is: I tried to start a new sample iOS app with
create-tauri-app
and that works fine. So there's definitely something odd about this project. I'll try to work on some more of the differences, and figure out a repro, but I'd love any debugging advice to point me to the right direction on how to add iOS to an existing project.More details about exactly what I ran:
src
andsrc-tauri
)xcode-select --install
brew install cocoapods
pnpm tauri ios init
vite.config.ts
to addhost: 0.0.0.0
Podfile
to remove the macOS target - strangely I didn't need to do this on the sample repo.pnpm tauri ios dev
Overall, I'd also appreciate any pointers into the Tauri repo I could investigate better. I don't really get what's trying to access
gen/apple/tauri
that doesn't seem like a real module to me.Reproduction
No response
Expected behavior
No response
Full
tauri info
outputStack trace
No response
Additional context
No response