Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changes/update-info-plist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tauri-plugin": minor:feat
---

Added `build::mobile::update_info_plist` to allow a plugin to update the iOS project Info.plist file.
17 changes: 17 additions & 0 deletions crates/tauri-plugin/src/build/mobile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,23 @@ pub fn update_entitlements<F: FnOnce(&mut plist::Dictionary)>(f: F) -> Result<()
Ok(())
}

#[cfg(target_os = "macos")]
pub fn update_info_plist<F: FnOnce(&mut plist::Dictionary)>(f: F) -> Result<()> {
if let (Some(project_path), Ok(app_name)) = (
var_os("TAURI_IOS_PROJECT_PATH").map(PathBuf::from),
std::env::var("TAURI_IOS_APP_NAME"),
) {
update_plist_file(
project_path
.join(format!("{app_name}_iOS"))
.join("Info.plist"),
f,
)?;
}

Ok(())
}

pub fn update_android_manifest(block_identifier: &str, parent: &str, insert: String) -> Result<()> {
if let Some(project_path) = var_os("TAURI_ANDROID_PROJECT_PATH").map(PathBuf::from) {
let manifest_path = project_path.join("app/src/main/AndroidManifest.xml");
Expand Down
Loading