mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-01-31 00:35:19 +01:00
fix(macos): frameworks being signed with entitlements unnecessarily (#12423)
This commit is contained in:
5
.changes/framework-entitlements.md
Normal file
5
.changes/framework-entitlements.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'tauri-cli': 'patch:enhance'
|
||||
---
|
||||
|
||||
Added conditional logic to MacOS codesigning where only executables get the entitlements file when being signed. This solves an issue where the app may not launch when using 3rd party frameworks if certain entitlements are added. Ex: multicast support (must be applied for through apple developer, and the framework would not have that capability).
|
||||
@@ -48,9 +48,14 @@ pub fn sign(
|
||||
log::info!(action = "Signing"; "with identity \"{}\"", keychain.signing_identity());
|
||||
|
||||
for target in targets {
|
||||
let entitlements_path = if target.is_an_executable {
|
||||
settings.macos().entitlements.as_ref().map(Path::new)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
keychain.sign(
|
||||
&target.path,
|
||||
settings.macos().entitlements.as_ref().map(Path::new),
|
||||
entitlements_path,
|
||||
target.is_an_executable && settings.macos().hardened_runtime,
|
||||
)?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user