Skip to content

fix(tauri): resolve oneshot in iOS open_external_url (unblocks iOS build) - #205

Open
sonegillis1 wants to merge 1 commit into
mainfrom
fix/ios-oneshot-build
Open

fix(tauri): resolve oneshot in iOS open_external_url (unblocks iOS build)#205
sonegillis1 wants to merge 1 commit into
mainfrom
fix/ios-oneshot-build

Conversation

@sonegillis1

Copy link
Copy Markdown
Contributor

Problem

cargo tauri ios build (target aarch64-apple-ios) fails to compile src-tauri/src/lib.rs:

error[E0433]: failed to resolve: use of unresolved module or unlinked crate `oneshot`
    --> src/lib.rs:1398   let (tx, rx) = oneshot::channel();
error[E0282]: type annotations needed   (x2, downstream fallout)

The iOS-only branch of open_external_url uses oneshot::channel() but nothing brings oneshot into scope. This has been broken on main since the code was written — iOS isn't built in CI (only the macOS DMG is), so it never got caught.

Fix

tokio (with features = ["full"]) is already a dependency, so qualify it:

let (tx, rx) = tokio::sync::oneshot::channel();

tokio::sync::oneshot's Receiver::await returns Result<T, RecvError>, which the existing .unwrap_or_else(|_| Err(...)) already flattens correctly — no other changes needed.

Verification

cargo check --target aarch64-apple-ios --libFinished (0 errors). Local make tauri-ios-build then archives + uploads to App Store Connect successfully.

🤖 Generated with Claude Code

…ild)

The iOS-only path in open_external_url called `oneshot::channel()` with no
`oneshot` in scope, so `cargo build --target aarch64-apple-ios` failed with
E0433 (unresolved module `oneshot`) plus two downstream E0282s. This has been
broken on main since the code was written — iOS isn't built in CI (only the
macOS DMG is), so it went unnoticed.

tokio (features = ["full"]) is already a dependency, so qualify it as
`tokio::sync::oneshot::channel()`. Verified: cargo check --target
aarch64-apple-ios now compiles.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sonegillis1
sonegillis1 requested a review from mamigot as a code owner August 6, 2026 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant