From a4310fb82597fe0152be7805b2ae2054d10d0226 Mon Sep 17 00:00:00 2001 From: Martin Rechsteiner Date: Tue, 7 Mar 2023 20:48:08 +0100 Subject: [PATCH] Fix issue with unsafe flags when using SwiftPM In #615, -weak_framework SwiftUI was added as an unsafe compiler flag to the Swift package and Xcode project. This fixed an issue where you could not use Parchment on platforms that did not support SwiftUI. It turned out that this causes another issue where users cannot install Parchment using SwiftPM (reproducible by creating a new Xcode project with the SwiftUI template). Removing this will probably bring back the other issue, but most people have started updating to iOS versions that support SwiftUI now. People still using older iOS version would have to target version 3.2.0, but that is probably fine as the majority of new features are likely to be SwiftUI improvements anyway. --- Package.swift | 9 ++------- Parchment.xcodeproj/project.pbxproj | 8 -------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/Package.swift b/Package.swift index 3be8c195..6950645b 100644 --- a/Package.swift +++ b/Package.swift @@ -10,12 +10,7 @@ let package = Package( targets: [ .target( name: "Parchment", - path: "Parchment", - linkerSettings: [ - .unsafeFlags([ - "-weak_framework", "SwiftUI", - ]), - ] - ), + path: "Parchment" + ) ] ) diff --git a/Parchment.xcodeproj/project.pbxproj b/Parchment.xcodeproj/project.pbxproj index 596ae52b..72bc0af6 100644 --- a/Parchment.xcodeproj/project.pbxproj +++ b/Parchment.xcodeproj/project.pbxproj @@ -1338,10 +1338,6 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - OTHER_LDFLAGS = ( - "-weak_framework", - SwiftUI, - ); PRODUCT_BUNDLE_IDENTIFIER = com.martinrechsteiner.Parchment; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -1366,10 +1362,6 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - OTHER_LDFLAGS = ( - "-weak_framework", - SwiftUI, - ); PRODUCT_BUNDLE_IDENTIFIER = com.martinrechsteiner.Parchment; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES;