Skip to content

Commit

Permalink
fix(macos): frameworks being signed with entitlements unnecessarily (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tr3ysmith authored Jan 23, 2025
1 parent 9d02c18 commit 9a30bed
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/framework-entitlements.md
Original file line number Diff line number Diff line change
@@ -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).
7 changes: 6 additions & 1 deletion crates/tauri-bundler/src/bundle/macos/sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)?;
}
Expand Down

0 comments on commit 9a30bed

Please # to comment.