From 84bb98c5dc89d7f719c56cfb67a325e85c1e0605 Mon Sep 17 00:00:00 2001
From: Patryk Grabowski
Date: Tue, 7 Feb 2023 14:02:55 +0100
Subject: [PATCH] Fix for warning: "Linking against a dylib which is not safe
for use in application extensions"
---
.../xcode/package.xcworkspace/contents.xcworkspacedata | 7 +++++++
Package.swift | 5 ++++-
Package@swift-5.3.swift | 7 ++++++-
3 files changed, 17 insertions(+), 2 deletions(-)
create mode 100644 .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
diff --git a/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 000000000..919434a62
--- /dev/null
+++ b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/Package.swift b/Package.swift
index 0e140ff0b..4ae57621a 100644
--- a/Package.swift
+++ b/Package.swift
@@ -18,6 +18,9 @@ let package = Package(
.library(name: "KeychainAccess", targets: ["KeychainAccess"])
],
targets: [
- .target(name: "KeychainAccess", path: "Lib/KeychainAccess")
+ .target(
+ name: "KeychainAccess",
+ path: "Lib/KeychainAccess",
+ linkerSettings: [.unsafeFlags(["-Xlinker", "-no_application_extension"])])
]
)
diff --git a/Package@swift-5.3.swift b/Package@swift-5.3.swift
index 4486abf78..0c76b6f26 100644
--- a/Package@swift-5.3.swift
+++ b/Package@swift-5.3.swift
@@ -18,6 +18,11 @@ let package = Package(
.library(name: "KeychainAccess", targets: ["KeychainAccess"])
],
targets: [
- .target(name: "KeychainAccess", path: "Lib/KeychainAccess", exclude:["Info.plist"])
+ .target(
+ name: "KeychainAccess",
+ path: "Lib/KeychainAccess",
+ exclude: ["Info.plist"],
+ linkerSettings: [.unsafeFlags(["-Xlinker", "-no_application_extension"])]
+ )
]
)