Skip to content

Commit 9a30bed

Browse files
authored
fix(macos): frameworks being signed with entitlements unnecessarily (#12423)
1 parent 9d02c18 commit 9a30bed

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.changes/framework-entitlements.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'tauri-cli': 'patch:enhance'
3+
---
4+
5+
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).

crates/tauri-bundler/src/bundle/macos/sign.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,14 @@ pub fn sign(
4848
log::info!(action = "Signing"; "with identity \"{}\"", keychain.signing_identity());
4949

5050
for target in targets {
51+
let entitlements_path = if target.is_an_executable {
52+
settings.macos().entitlements.as_ref().map(Path::new)
53+
} else {
54+
None
55+
};
5156
keychain.sign(
5257
&target.path,
53-
settings.macos().entitlements.as_ref().map(Path::new),
58+
entitlements_path,
5459
target.is_an_executable && settings.macos().hardened_runtime,
5560
)?;
5661
}

0 commit comments

Comments
 (0)