Closed stolinski closed 5 days ago
this should hopefully be fixed by https://github.com/tauri-apps/tauri/pull/11063 - can you try this?
cargo install tauri-cli --git https://github.com/tauri-apps/tauri
cargo tauri build / cargo tauri ios dev
Edit: Or well, maybe not as they were building for iOS, still worth a try i guess. If it doesn't work with the git cli either i guess we'll have to do the same as the PR for the set_env line above it.
Okay, i just did what i said in the Edit above, can you try this then please (different branch than above)?
cargo install tauri-cli --git https://github.com/tauri-apps/tauri --branch fix/sysroot
cargo tauri ios dev
Update here.
I tried to install via cargo install tauri-cli --git https://github.com/tauri-apps/tauri --branch dev
since fix/sysroot was merged and deleted but got this compile error when installing.
error[E0432]: unresolved import `tower::util`
--> /Users/scotttolinski/.cargo/registry/src/index.crates.io-6f17d22bba15001f/jsonrpsee-server-0.24.4/src/utils.rs:37:12
|
37 | use tower::util::Oneshot;
| ^^^^ could not find `util` in `tower`
|
note: found an item that was configured out
--> /Users/scotttolinski/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tower-0.4.13/src/lib.rs:215:9
|
215 | pub mod util;
| ^^^^
note: the item is gated behind the `util` feature
--> /Users/scotttolinski/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tower-0.4.13/src/lib.rs:213:7
|
213 | #[cfg(feature = "util")]
| ^^^^^^^^^^^^^^^^
error[E0432]: unresolved import `tower::ServiceExt`
--> /Users/scotttolinski/.cargo/registry/src/index.crates.io-6f17d22bba15001f/jsonrpsee-server-0.24.4/src/utils.rs:38:5
|
38 | use tower::ServiceExt;
| ^^^^^^^----------
| | |
| | help: a similar name exists in the module: `Service`
| no `ServiceExt` in the root
|
note: found an item that was configured out
--> /Users/scotttolinski/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tower-0.4.13/src/lib.rs:223:34
|
223 | pub use self::util::{service_fn, ServiceExt};
| ^^^^^^^^^^
note: the item is gated behind the `util` feature
--> /Users/scotttolinski/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tower-0.4.13/src/lib.rs:220:7
|
220 | #[cfg(feature = "util")]
| ^^^^^^^^^^^^^^^^
Compiling which v6.0.3
error[E0599]: the method `graceful_shutdown` exists for struct `Pin<&mut UpgradeableConnection<'_, TokioIo<TcpStream>, TowerToHyperService<<... as Layer<...>>::Service>, ...>>`, but its trait bounds were not satisfied
--> /Users/scotttolinski/.cargo/registry/src/index.crates.io-6f17d22bba15001f/jsonrpsee-server-0.24.4/src/server.rs:1233:19
|
1233 | conn.as_mut().graceful_shutdown();
| ^^^^^^^^^^^^^^^^^ method cannot be called due to unsatisfied trait bounds
|
::: /Users/scotttolinski/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-util-0.1.9/src/rt/tokio.rs:16:1
|
16 | pub struct TokioExecutor {}
| ------------------------ doesn't satisfy `_: HttpServerConnExec<TowerToHyperServiceFuture<<HttpMiddleware as Layer<TowerServiceNoHttp<RpcMiddleware>>>::Service, Request<Body>>, Body>`
|
= note: the full type name has been written to '/var/folders/fm/_sgpt7q91_x97jrvd53whjtm0000gn/T/cargo-installbRRUJo/release/deps/jsonrpsee_server-11cc40a95bfd3e8c.long-type-1070622843571128600.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: the following trait bounds were not satisfied:
`{type error}: Sized`
which is required by `TokioExecutor: HttpServerConnExec<utils::TowerToHyperServiceFuture<<HttpMiddleware as Layer<TowerServiceNoHttp<RpcMiddleware>>>::Service, hyper::Request<jsonrpsee_core::http_helpers::Body>>, Body>`
error[E0599]: no method named `oneshot` found for type parameter `S` in the current scope
--> /Users/scotttolinski/.cargo/registry/src/index.crates.io-6f17d22bba15001f/jsonrpsee-server-0.24.4/src/utils.rs:61:60
|
51 | impl<S> hyper::service::Service<HttpRequest<hyper::body::Incoming>> for TowerToHyperService<S>
| - method `oneshot` not found for this type parameter
...
61 | TowerToHyperServiceFuture { future: self.service.clone().oneshot(req) }
| ^^^^^^^ method not found in `S`
Compiling tower v0.5.1
Compiling reqwest v0.12.7
Some errors have detailed explanations: E0432, E0599.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `jsonrpsee-server` (lib) due to 4 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `tauri-cli v2.0.0-rc.16 (https://github.com/tauri-apps/tauri?branch=dev#a944b9b0)`, intermediate artifacts can be found at `/var/folders/fm/_sgpt7q91_x97jrvd53whjtm0000gn/T/cargo-installbRRUJo`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
So am unable to test the fix.
cargo install tauri-cli --git https://github.com/tauri-apps/tauri --branch dev --locked
Hm. After running cargo install tauri-cli --git https://github.com/tauri-apps/tauri --branch dev --locked
Still unable to get passed
<unknown>:0: warning: using sysroot for 'iPhoneOS' but targeting 'MacOSX'
<unknown>:0: error: unable to load standard library for target 'arm64-apple-macosx13.0'
fwiw my tauri info looks like
[✔] Environment
- OS: Mac OS 15.0.0 arm64 (X64)
✔ Xcode Command Line Tools: installed
✔ rustc: 1.81.0 (eeb90cda1 2024-09-04)
✔ cargo: 1.81.0 (2dbb1af80 2024-08-20)
✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
✔ Rust toolchain: stable-aarch64-apple-darwin (default)
- node: 20.16.0
- pnpm: 9.7.0
- npm: 10.8.1
- bun: 1.0.25
[-] Packages
- tauri 🦀: 2.0.0-rc.15
- tauri-build 🦀: 2.0.0-rc.12
- wry 🦀: 0.43.1
- tao 🦀: 0.30.1
- tauri-cli 🦀: 2.0.0-rc.16
- @tauri-apps/api : 2.0.0-rc.5
- @tauri-apps/cli : 2.0.0-rc.16
[-] Plugins
- tauri-plugin-shell 🦀: 2.0.0-rc.3
- @tauri-apps/plugin-shell : 2.0.0-rc.1
[-] App
- build-type: bundle
- CSP: unset
- frontendDist: ../build
- devUrl: http://localhost:1420/
- framework: Svelte
- bundler: Vite
So CLI version is rc.16
why are you building your iOS plugin code directly with swift-rs instead of using tauri's build script? something like this: https://github.com/tauri-apps/plugins-workspace/blob/3b2bd3065d516735b33519df014a81b0d481c7a8/plugins/notification/build.rs#L28
anyway, you need to remove the SDKROOT environment variable before building the Swift code (like this: https://github.com/tauri-apps/tauri/blob/60a5aea53db02ae6af325812ab97555f2c013d70/crates/tauri-utils/src/build.rs#L23)
Thank you for the fix, I can confirm it's working. As for why using swift-rs, I was just porting an existing IAP plugin and that was the strategy they used. I'll try the build script approach as well.
Describe the bug
I'm attempting to port Tauri In App Payments to both v2 as well as iOS. Everything is building, but when running tauri ios dev i'm getting an invalid manifest error.
I had posted on Discord about if this was a swift-rs issue or a Tauri issue and was told to open here, but it's possibly a swift-rs issue.
Reproduction
https://github.com/stolinski/scott-ttemp
Run
tauri dev ios
Expected behavior
App loads.
Full
tauri info
outputStack trace
Additional context
With some adjustments it worked just fine for MacOS but never for iOS.