-
Notifications
You must be signed in to change notification settings - Fork 92
Description
Issue
On iOS, we are able to use --config to override the identifier field for iOS dev/build commands, such as tauri ios dev.
However, the same does not work on Android; the command fails with a "Project directory does not exist" error.
XCode takes the bundle name as an argument, while Android requires it to be a configuration in the project gradle files (using the applicationIdSuffix property).
This prevents a common development workflow: having both debug and release versions of an app installed side-by-side on the same device.
For example, a developer may need to testi a debug build while also having the App Store release version installed.
This is especially important when testing device-specific issues, or crashes that occur only in either debug or release, but not the other, such as bugs related to code obfuscation for release builds.
Desired solution
In the tauri-cli crate, we are proposing this behavior:
tauri android dev should start the debug build variant.
tauri android dev --release should start the release build variant.
However, to support this, a change is required in cargo-mobile2 to allow the run command to take an applicationIdSuffix argument, allowing to describe which build variant should be run.
Considered alternatives
In initial development, a small shim layer was created to start the debug variant directly in the tauri-cli crate by calling directly to adb.
However, this is a poor solution, as all commands to start an Android activity should go through the same path.