feat(ios): add a new cli option to dev to use project archs

Add a new option to instruct cargo-mobile2 to use architectures configured in the project for building
This commit is contained in:
mrguiman 2024-07-31 11:02:22 +02:00
parent efdce038bb
commit fbc309ddb7
No known key found for this signature in database

View File

@ -67,6 +67,9 @@ pub struct Options {
/// Specify port for the built-in dev server for static files. Defaults to 1430.
#[clap(long, env = "TAURI_CLI_PORT")]
pub port: Option<u16>,
/// Build using architectures setup for each target within the Xcode project
#[clap(long)]
pub use_project_archs: bool,
}
impl From<Options> for DevOptions {
@ -128,12 +131,14 @@ fn run_command(options: Options, noise_level: NoiseLevel) -> Result<()> {
let interface = AppInterface::new(tauri_config_, Some(target_triple))?;
let app = get_app(tauri_config_, &interface);
let (config, _metadata) = get_config(
let (mut config, _metadata) = get_config(
&app,
tauri_config_,
dev_options.features.as_ref(),
&Default::default(),
);
config.set_use_project_archs(options.use_project_archs);
(interface, app, config)
};