-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MOBILE when? #843
Comments
Are there concrete points on which new contributors could spend time in order to move this effort forward? |
I don't know that there has been any concrete work done other than planning / research that is noted above. Are you interested in helping to push this forward @Moxinilian? |
To the extent of my capabilities, yes! But I am not familiar with the tauri codebase at all, perhaps I should read and understand it first. |
For what it's worth however, I don't really understand the motivation behind unifying both mobile implementations. The way one accesses them is sufficiently different that in my opinion they deserve specialized code. Also, adding a Kotlin layer would add one more layer of indirection iOS does not need as you can simply access the relatively simple WebKit interface through regular FFI (I am more familiar with iOS than Android however, so maybe the situation is different on the other side). |
@Moxinilian With Android you can access the WebView directly as well through the Android SDK. My reasoning for looking at Kotlin has to do with handling both platforms. Kotlin native can interface both with Android and iOS; it would basically let us share code across both platforms. The alternative would be to build two isolated layers; a Kotlin layer for android and a swift layer for iOS; it would get very complex though. |
Kotlin Multiplatform Mobile seems like a good way to go here at some point. The UI layer for ios would still need to be done in swift but having worked on a couple multiplatform kotlin apps over the last year, it works really well. This particular link though is to a newer effort to improve the experience and may not be ready yet. |
coming soon ™️ |
It's great that mobile is on the roadmap. I am finding it a little difficult to choose what to use for a GUI right now for a new project. It must have easy support for calling Rust or Golang (or C library). This doesn't seem straightforward in RN/Expo, and desktop has to be Electron. Tauri on the other hand seems to be just what I am after, rust back end and web GUI. If I must support mobile at some point though, say within a year, is Tauri a reasonable choice? Or is it too early to say, would really value your advice. |
We already have a working prototype for iOS, and within a year is totally reasonable for the major mobile platforms. |
6 months passed already. What's the mobile support status now? Will they be okay before 2022? Thanks @nothingismagick |
@hustcer |
@FabianLars is right. Hopefully we will be able to offer early access in Q1 2022 😜 but it will all need to be audited, and so Q2 2022 is just about a year after I made the comment that we will need a year. :) |
Do you consider pushing iOS support, even if Android would not be ready yet? |
We will put out beta-quality code as it becomes available, but we will probably do the final security audit for both systems, like how we did the desktop audit. |
@FabianLars have you found anyone for android yet ? If not, I would like to take it up but will require guidance on how to go about it. |
@AP2008 Yeah we recently found someone who will work together with Yu on it. But we appreciate every helping hand, even if "just" for testing ❤️ So if you're interested you can say hello in the #tao-wry channel on discord (or maybe via pm |
Out of curiosity, will the solution resemble the desktop stack (Webview + Rust native bindings)? |
@pepicrft Generally yes. Android is tricky tho and may require the dev to use Java/Kotlin in some places, but we'll have to wait and see for that one. |
After 5 years of working with mobile use native tech like kotlin,swift and using cross platform tech like flutter, react native etc i honestly don't like using cross platform technology for mobile. I had so many performance issues with react native especially on low end android devices. Flutter is great and even though i have not faced any performance issues as such for flutter, some people do complain about flutter's performance on ios as ios uses metal backend even though skia(on which flutter is based on) has added support for metal. I have just decided to stick with Native tech as every year Google Io and wwdc there are so many changes to each platform that it is difficult to keep up for these cross platform tech. I have my doubts about Kotlin multiplatform mobile especially on ios though i have never tried it. I understand tauri takes completely different approach as compared to these cross platform tech and i would be really happy if you guys come up with your own soln for mobile but do consider carefully before investing time, energy and money in mobile. I dont want this project to suffer because of mobile as it does a great job for desktop apps. Would really like the tauri project to be really good at one thing. Maybe maintain a separate repo for mobile. Sorry if any of my words hurt anybody. |
I don’t think that’s a radical position, and your personal technical opinion certainly shouldn’t shouldn’t be taken as an offense to anyone Even though it kind of takes the opposite position, this post seems fairly well aligned with the point you’re making: https://news.ycombinator.com/item?id=31243501 Native apps still have their place, but for most applications the native app frameworks only need to provide a very thin layer for the last stretch of the app development process. |
Thank you very much for your amazing project! Now is Q3 of 2022. Do you have any assumptions when iOS support will be added? |
Tauri is next gen takeover for react-native, ionic and other mobile/web frameworks |
Looking forward to the alpha/beta release and related demo.. |
This comment was marked as off-topic.
This comment was marked as off-topic.
I am not sure how Tauri works, just stumbled upon this page. Are you using a similar approach to capacitorJS ? |
@LeFede |
@MadScientist2854 according to this note it would be possible even in android. Recap: Using cargo-mobile I guess I couldn't figure how to setup my files to make it work and using tauri-mobile gave me errors I couldn't figure out how to fix :( Thank you for your clarification |
btw we're working on actual docs here: tauri-apps/tauri-docs#1001 |
@FabianLars okay, after following step by step my app works on desktop but when I try to compile fo mobile it says: error[E0433]: failed to resolve: could not find `mobile_entry_point` in `tauri`
--> src/mobile.rs:1:10bug
|
1 | #[tauri::mobile_entry_point]
| ^^^^^^^^^^^^^^^^^^ could not find `mobile_entry_point` in `tauri`
For more information about this error, try `rustc --explain E0433`.
error: could not compile `app` due to previous error
Error `Failed to run `cargo build`: Command "cargo build --package app --manifest-path /home/fede/dev/tauri-app2/src-tauri/Cargo.toml --target aarch64-linux-android --no-default-features --color always" didn't complete successfully, exiting with code 101. Since I don't know much about rust I can't figure how to solve this out. Apparently it doesn't find the package mobile_entry_point ? or namespace... not sure Any ideas? |
If I comment out the I get the following: fede@main ~/dev/tauri-app2 $ cargo tauri android dev
Running BeforeDevCommand (`npm run dev`)
> [email protected] dev
> vite
VITE v3.2.4 ready in 220 ms
➜ Local: http://localhost:5173/
➜ Network: http://{public_ip_I_am_not_showing}:5173/
Info detected host target triple "x86_64-unknown-linux-gnu"
Detected connected device: Meep 🦊 (Mi A2) with target "aarch64-linux-android"
Info symlink at "/home/fede/dev/tauri-app2/src-tauri/gen/android/app/app/src/main/jniLibs/arm64-v8a/libapp.so" points to "/home/fede/dev/tauri-app2/src-tauri/target/aarch64-linux-android/debug/libapp.so"
<=============> 100% CONFIGURING [285ms]
> IDLE
Compiling wry v0.22.5TING [385ms]
Compiling app v0.1.0 (/home/fede/dev/tauri-app2/src-tauri)t is not connected (os error 107); terminate connection: 0
error: failed to run custom build command for `wry v0.22.5`
Caused by:
process didn't exit successfully: `/home/fede/dev/tauri-app2/src-tauri/target/debug/build/wry-82393426eaa0162e/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-env-changed=WRY_ANDROID_REVERSED_DOMAIN
cargo:rerun-if-env-changed=WRY_ANDROID_APP_NAME_SNAKE_CASE
cargo:rerun-if-env-changed=WRY_ANDROID_KOTLIN_FILES_OUT_DIR
--- stderr
thread 'main' panicked at 'Failed to canonicalize path: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /home/fede/.cargo/registry/src/github.com-1ecc6299db9ec823/wry-0.22.5/build.rs:36:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
Error `Failed to run `cargo build`: Command "cargo build --package app --manifest-path /home/fede/dev/tauri-app2/src-tauri/Cargo.toml --target aarch64-linux-android --no-default-features --color always" didn't complete successfully, exiting with code 101.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:rustBuildArm64Debug'.
> Process 'command '/home/fede/.cargo/bin/cargo-tauri'' finished with non-zero exit value 1
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 936ms
Error Failed to assemble APK: Command "/home/fede/dev/tauri-app2/src-tauri/gen/android/app/gradlew --project-dir /home/fede/dev/tauri-app2/src-tauri/gen/android/app assembleArm64Debug --warn" didn't complete successfully, exiting with code 1.
Btw I forgot to mention that to scafold the whole project I used: yarn create vite
yarn tauri init
cargo tauri android init
cargo tauri android dev |
yeassssssssssssssssssssssssssssss |
hahaha exactly! same thought here 🤜🏼 🤛🏼 👏🏼 |
Hello can you help me when i run ` VITE v4.0.3 ready in 639 ms ➜ Local: http://localhost:5173/ FAILURE: Build failed with an exception.
BUILD FAILED in 23s |
@Akarimichi Sounds like you're either missing this [lib]
crate-type = ["staticlib", "cdylib", "rlib"] in your Cargo.toml file, or maybe you didn't run |
Hello @FabianLars did you have an example of a repository of tauri setup for android, to try ? Because i already run |
I found this repo as an alternative. They claim to have support for mobile devices (in alpha) |
This doesn't help me because it's not tauri :/ |
Any example for android (in alpha) |
Is there any examples for ios and android? I follow the tauri mobile guide but still failed to build a demo for ios. |
I would like to know if tauri's webview will be optimized, or different from other webviews? |
It will use the system webviews for now. (meaning the standard chromium webview on android, and wkwebview on ios, which btw is the webview that all browsers on ios have to use, though that may change). Later down the line we could look into alternatives, like geckoview on android... |
Hello. Is this compatible with an Angular app ? My app on the android emulator is only displaying my index but not my components ? There's no probleme if I run the same project on the desktop app (without the "android flag") ? |
Create lib.rs file in src, you will success run. |
Is there any timeline or date plans for tauri beta or final release. I have seen alpha status for a few months or years. I look forward to build my tauri app for mobile platform. I have tried the alpha version of tauri, it looks good for me. |
Got the same error, any ideas? |
is there any doc for how to do this? thanks! |
@xeoshow Hi, I found some help links you may interested. |
It seems the stable 2.0 will arrive in early 2024. See Roadmap to Tauri 2.0. |
This is a tracking issue for our work toward making mobile available. The following is a citation from @tensor-programming
in the wg-tech discussion we had a few days ago:
The text was updated successfully, but these errors were encountered: