[feat] Remove `tauri android build` and `tauri iOS build`
Describe the problem
Currently all the mobile code is behind their own subcommands tauri ios and tauri android respectively. This feels rather weird to me, especially since they accept wildly different options to the regular build commands.
As a new user starting off with Tauri I would also expect tauri build to build all possible targets
Describe the solution you'd like
Incorporate tauri ios build and tauri android build into tauri build proper
Alternatives considered
No response
Additional context
No response
@JonasKruckenberg but would that work in windows ? If we do as you said tauri build will fail on iOS step no ? Or I did not get your point An alternative would be tauri build all ... wdyt ?
If we do as you said tauri build will fail on iOS step no ? Or I did not get your point
Well Android and iOS would work just like any other OS, e.g. you cannot build Linux artifacts on Windows and so the CLI will just not attempt to build the app for those targets
currently tauri build only builds for the host target so imo it would be a bit unexpected if it also tries to build for mobile. I don't think android build is necessarily the solution but integrating it into just tauri build is not the solution imho
I am in favor of this one, tauri build should build apk/ios but only if bundle > targets includes apk and ios targets.
should it also build the nsis target on linux automatically then and other targets when they get cross-platform support?
yeah, it should
yeah IMO the CLI should build as many targets as are possible and configured when running tauri build
The main problem with that is that this needs to build the rust app multiple times. And it would be super awkward in CI (if you use multiple platforms).
i'm not completely against the idea but we really need to be careful to not mess up the user/developer experience.
We can check if the rust target is available and instruct users to install the required target or skip it.
We can check if the rust target is available and instruct users to install the required target or skip it. yes @amrbashir would provide better feedback, good for dev experience 👍
currently
tauri buildonly builds for the host target
Not sure if this counts, but on macOS you can cross compile architectures, after you install the necessary targets (x86_64 if on aarch64, aarch64 if on x86_64) you can run these:
tauri build --target aarch64-apple-darwintauri build --target x86_64-apple-darwintauri build --target universal-apple-darwin
This is similar to cargo build --target target-triple-here
IMO the CLI should build as many targets as are possible and configured
I personally think its best to build one target at a time, then if you want to build for multiple, you build them one at a time, or write a script to do so? ><
I'd like to only build the target I'm working on, and that I want built. If I'm testing an apk why do I want to build a debian package for desktop?
I'd like to only build the target I'm working on, and that I want built. If I'm testing an apk why do I want to build a debian package for desktop?
@bburdette you can do tauri build -b "nsis" or tauri build -b "deb" or tauri build -b "wix,nsis" or if you don't want to bundle any at all, you can in v1 do tauri build -b "none" or in v2 do tauri build --no-bundle