Skip to content

Commit abc5f91

Browse files
authored
fix(cli): iOS Xcode script using incorrect library path (#6699)
1 parent 57fa569 commit abc5f91

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"cli.rs": patch
3+
"cli.js": patch
4+
---
5+
6+
Fixes iOS build script using the wrong path for the app library file.

tooling/cli/src/mobile/ios/xcode_script.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use super::{env, with_config};
66
use crate::{
7-
helpers::config::get as get_config,
7+
helpers::{app_paths::tauri_dir, config::get as get_config},
88
interface::{AppInterface, AppSettings, Interface, Options as InterfaceOptions},
99
Result,
1010
};
@@ -200,17 +200,19 @@ pub fn command(options: Options) -> Result<()> {
200200
if !lib_path.exists() {
201201
return Err(anyhow::anyhow!("Library not found at {}. Make sure your Cargo.toml file has a [lib] block with `crate-type = [\"staticlib\", \"cdylib\", \"rlib\"]`", lib_path.display()));
202202
}
203-
std::fs::create_dir_all(format!(
203+
204+
let tauri_path = tauri_dir();
205+
std::fs::create_dir_all(tauri_path.join(format!(
204206
"gen/apple/Externals/{}",
205207
profile.as_str()
206-
))?;
208+
)))?;
207209
std::fs::copy(
208210
lib_path,
209-
format!(
211+
tauri_path.join(format!(
210212
"gen/apple/Externals/{}/lib{}.a",
211213
profile.as_str(),
212214
config.app().lib_name()
213-
),
215+
))
214216
)?;
215217
}
216218
Ok(())

0 commit comments

Comments
 (0)