fix(cli): possibly empty associated-domains entitlement (#14779)

This commit is contained in:
Lucas Fernandes Nogueira 2026-01-18 15:01:36 -03:00 committed by GitHub
parent 08e35fcda0
commit eccff97588
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 8 deletions

View File

@ -0,0 +1,6 @@
---
"tauri-cli": patch:bug
"@tauri-apps/cli": patch:bug
---
Fix empty associated-domains entitlements when domains are not configured for deep links.

View File

@ -1454,14 +1454,16 @@ fn tauri_config_to_bundle_settings(
.map(tauri_bundler::bundle::Entitlements::Path) .map(tauri_bundler::bundle::Entitlements::Path)
} else { } else {
let mut app_links_entitlements = plist::Dictionary::new(); let mut app_links_entitlements = plist::Dictionary::new();
app_links_entitlements.insert( if !domains.is_empty() {
"com.apple.developer.associated-domains".to_string(), app_links_entitlements.insert(
domains "com.apple.developer.associated-domains".to_string(),
.into_iter() domains
.map(|domain| format!("applinks:{domain}").into()) .into_iter()
.collect::<Vec<_>>() .map(|domain| format!("applinks:{domain}").into())
.into(), .collect::<Vec<_>>()
); .into(),
);
}
let entitlements = if let Some(user_provided_entitlements) = config.macos.entitlements { let entitlements = if let Some(user_provided_entitlements) = config.macos.entitlements {
crate::helpers::plist::merge_plist(vec![ crate::helpers::plist::merge_plist(vec![
PathBuf::from(user_provided_entitlements).into(), PathBuf::from(user_provided_entitlements).into(),