File tree Expand file tree Collapse file tree 2 files changed +13
-15
lines changed
crates/tauri-cli/src/mobile/ios Expand file tree Collapse file tree 2 files changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ pub struct Options {
4747 /// Builds with the debug flag
4848 #[ clap( short, long) ]
4949 pub debug : bool ,
50- /// Which targets to build (all by default) .
50+ /// Which targets to build.
5151 #[ clap(
5252 short,
5353 long = "target" ,
@@ -363,9 +363,15 @@ fn run_build(
363363
364364 let mut out_files = Vec :: new ( ) ;
365365
366+ let force_skip_target_fallback = options. targets . as_ref ( ) . is_some_and ( |t| t. is_empty ( ) ) ;
367+
366368 call_for_targets_with_fallback (
367369 options. targets . unwrap_or_default ( ) . iter ( ) ,
368- & detect_target_ok,
370+ if force_skip_target_fallback {
371+ & |_| None
372+ } else {
373+ & detect_target_ok
374+ } ,
369375 env,
370376 |target : & Target | -> Result < ( ) > {
371377 let mut app_version = config. bundle_version ( ) . to_string ( ) ;
@@ -477,7 +483,9 @@ fn run_build(
477483 )
478484 . map_err ( |e : TargetInvalid | anyhow:: anyhow!( e. to_string( ) ) ) ??;
479485
480- log_finished ( out_files, "iOS Bundle" ) ;
486+ if !out_files. is_empty ( ) {
487+ log_finished ( out_files, "iOS Bundle" ) ;
488+ }
481489
482490 Ok ( handle)
483491}
Original file line number Diff line number Diff line change 44
55use std:: path:: PathBuf ;
66
7- use cargo_mobile2:: {
8- apple:: target:: Target ,
9- opts:: { NoiseLevel , Profile } ,
10- target:: TargetTrait ,
11- } ;
7+ use cargo_mobile2:: opts:: { NoiseLevel , Profile } ;
128use clap:: { ArgAction , Parser } ;
139
1410use super :: { device_prompt, env} ;
@@ -79,13 +75,7 @@ pub fn command(options: Options, noise_level: NoiseLevel) -> Result<()> {
7975 let mut built_application = super :: build:: command (
8076 super :: build:: Options {
8177 debug : !options. release ,
82- targets : device. as_ref ( ) . map ( |d| {
83- vec ! [ Target :: all( )
84- . iter( )
85- . find( |( _key, t) | t. arch == d. target( ) . arch)
86- . map( |( key, _t) | key. to_string( ) )
87- . expect( "Target not found" ) ]
88- } ) ,
78+ targets : Some ( vec ! [ ] ) , /* skips IPA build since there's no target */
8979 features : None ,
9080 config : options. config . clone ( ) ,
9181 build_number : None ,
You can’t perform that action at this time.
0 commit comments