tauri-apps / tauri

Build smaller, faster, and more secure desktop and mobile applications with a web frontend.
https://tauri.app
Apache License 2.0
84.06k stars 2.53k forks source link

MOBILE when? #843

Closed nothingismagick closed 3 years ago

nothingismagick commented 4 years ago

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:

Well much of it is just down to connecting the existing tauri library to the native webview.
And the native webview can be access a number of ways.
Though it would likely be easier to keep that access consistent across the two mobile 
platforms Thats why kotlin for instance was a choice that I was considering.  
Its got the ability to access both iOS and android.
So a lot of it is just taking our existing interface and molding the android and iOS 
webviews to it.
All those functions that set the title, push the javascript and html in, make a window etc.
And then I guess the final thing that you want to do is just make sure that you can 
compile the Rust with the other code and load it onto a mobile device
Though all of that should be straight forward.
We could take our c++ bindings and expand them for android and iOS or we could make 
a library using kotlin and/or java and swift
The rest of the stuff is just the same things that we are working on for tauri desktop
FabianLars commented 1 year ago

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...

ddx95 commented 1 year ago

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") ?

liamxujia commented 1 year ago

Create lib.rs file in src, you will success run.

liudonghua123 commented 1 year ago

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.

tbdrz commented 1 year ago

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_entrypoint ? or namespace... not sure

Any ideas?

Got the same error, any ideas?

xeoshow commented 1 year ago

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.

is there any doc for how to do this? thanks!

liudonghua123 commented 1 year ago

@xeoshow Hi, I found some help links you may interested.

liudonghua123 commented 1 year ago

It seems the stable 2.0 will arrive in early 2024. See Roadmap to Tauri 2.0.