From 38a2d194a35c4b0c6ebd67ae505208b6e8d68a98 Mon Sep 17 00:00:00 2001 From: Kelvin Ng Date: Sat, 11 Jul 2026 14:49:04 +0800 Subject: [PATCH] fix(build): embed MediaRemoteAdapter.framework in the app bundle The MediaRemoteAdapter Swift package product was linked but had no Embed Frameworks build phase, so `xcodebuild build` left the dynamic framework in DerivedData's PackageFrameworks/ and resolved it only via a dev-time rpath. The built .app ran in place but crashed once copied elsewhere (e.g. to /Applications) with "Library not loaded: @rpath/MediaRemoteAdapter.framework". Add an Embed Frameworks copy-files phase (Embed & Sign / CodeSignOnCopy) so the framework is packaged into Contents/Frameworks and the build product is relocatable. Archive-based builds embedded it implicitly; plain `build` did not. Co-Authored-By: Claude Opus 4.8 (cherry picked from commit 5ebe9f64dffa8394b9151f48a3cb841d5f02e2ef) --- Fluid.xcodeproj/project.pbxproj | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Fluid.xcodeproj/project.pbxproj b/Fluid.xcodeproj/project.pbxproj index 3c98aacd..fa8bf5f4 100644 --- a/Fluid.xcodeproj/project.pbxproj +++ b/Fluid.xcodeproj/project.pbxproj @@ -11,6 +11,7 @@ 7C1C72F22EECBD1300E3BF4D /* SwiftWhisper in Frameworks */ = {isa = PBXBuildFile; productRef = 7C1C72F12EECBD1300E3BF4D /* SwiftWhisper */; }; 7C3697892ED70F9C005874CE /* DynamicNotchKit in Frameworks */ = {isa = PBXBuildFile; productRef = 7C3697882ED70F9C005874CE /* DynamicNotchKit */; }; 7C5AF14B2F15041600DE21B0 /* MediaRemoteAdapter in Frameworks */ = {isa = PBXBuildFile; productRef = 7C5AF14A2F15041600DE21B0 /* MediaRemoteAdapter */; }; + 7C5AF14C2F15041600DE21B0 /* MediaRemoteAdapter in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 7C5AF14A2F15041600DE21B0 /* MediaRemoteAdapter */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 7C91B0012F42AA0100C0DEF0 /* HotkeyShortcutTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C91B0022F42AA0100C0DEF0 /* HotkeyShortcutTests.swift */; }; 7CDB0A2D2F3C4D5600FB7CAD /* DictationE2ETests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CDB0A292F3C4D5600FB7CAD /* DictationE2ETests.swift */; }; 7CDB0A2E2F3C4D5600FB7CAD /* AudioFixtureLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CDB0A2A2F3C4D5600FB7CAD /* AudioFixtureLoader.swift */; }; @@ -74,6 +75,20 @@ }; /* End PBXFrameworksBuildPhase section */ +/* Begin PBXCopyFilesBuildPhase section */ + 7C5AF14D2F15041600DE21B0 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 7C5AF14C2F15041600DE21B0 /* MediaRemoteAdapter in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXGroup section */ 7C078D862E3B339200FB7CAC = { isa = PBXGroup; @@ -148,6 +163,7 @@ 7C078D8B2E3B339200FB7CAC /* Sources */, 7C078D8C2E3B339200FB7CAC /* Frameworks */, 7C078D8D2E3B339200FB7CAC /* Resources */, + 7C5AF14D2F15041600DE21B0 /* Embed Frameworks */, ); buildRules = ( );