From 6f824a54247148caae8e81673da5f2d6c6a99b83 Mon Sep 17 00:00:00 2001 From: Ethan Wong Date: Mon, 24 May 2021 13:11:12 +0800 Subject: [PATCH] Add script in main app's build phase to delete unnecessary frameworks for Share Extension (workaround for Xcode 12.5) --- NetNewsWire.xcodeproj/project.pbxproj | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/NetNewsWire.xcodeproj/project.pbxproj b/NetNewsWire.xcodeproj/project.pbxproj index 6a1181189..f3a91740c 100644 --- a/NetNewsWire.xcodeproj/project.pbxproj +++ b/NetNewsWire.xcodeproj/project.pbxproj @@ -4008,6 +4008,7 @@ 84C987A52000AC9E0066B150 /* Run Script: Automated build numbers */, 84B06F681ED37B9000F0B54B /* Embed Frameworks */, 6581C75720CED60100F4AD34 /* Embed App Extensions */, + 7180F95C265B67B800189094 /* Run Script: Delete Unnecessary Frameworks For Share Extension */, D519E77022EE5B4100923F27 /* Run Script: Verify No Build Settings */, 8423E3E3220158E700C3795B /* Run Script: Code Sign Sparkle */, ); @@ -4539,6 +4540,24 @@ shellPath = /bin/sh; shellScript = "xcrun -sdk macosx swiftc -target x86_64-macosx10.11 buildscripts/VerifyNoBuildSettings.swift -o $CONFIGURATION_TEMP_DIR/VerifyNoBS\n$CONFIGURATION_TEMP_DIR/VerifyNoBS ${PROJECT_NAME}.xcodeproj/project.pbxproj\n\nif [ $? -ne 0 ]\nthen\n echo \"error: Build Setting were found in the project.pbxproj file. Most likely you didn't intend to change this file and should revert it.\"\n exit 1\nfi\n"; }; + 7180F95C265B67B800189094 /* Run Script: Delete Unnecessary Frameworks For Share Extension */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Run Script: Delete Unnecessary Frameworks For Share Extension"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "# Delete the framework that Xcode should have never included\n# https://forums.swift.org/t/is-this-an-xcode-bug-or-somehow-related-to-spm/33987\nrm -rf \"${TARGET_BUILD_DIR}/${PLUGINS_FOLDER_PATH}/NetNewsWire Share Extension.appex/Contents/Frameworks\"\n"; + }; 8423E3E3220158E700C3795B /* Run Script: Code Sign Sparkle */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647;