diff --git a/Package.swift b/Package.swift
index 66fde6e1..b5dc89e9 100644
--- a/Package.swift
+++ b/Package.swift
@@ -1,4 +1,4 @@
-// swift-tools-version:5.0
+// swift-tools-version:5.3
import PackageDescription
@@ -14,9 +14,12 @@ let package = Package(
targets: [
.target(
- name: "Swifter",
- dependencies: [],
- path: "Xcode/Sources"
+ name: "Swifter",
+ dependencies: [],
+ path: "Xcode/Sources",
+ resources: [
+ .copy("../Resources/PrivacyInfo.xcprivacy")
+ ]
),
.target(
diff --git a/Package@swift-5.0.swift b/Package@swift-5.0.swift
new file mode 100644
index 00000000..9fc9f48c
--- /dev/null
+++ b/Package@swift-5.0.swift
@@ -0,0 +1,38 @@
+// swift-tools-version:5.0
+
+import PackageDescription
+
+let package = Package(
+ name: "Swifter",
+
+ products: [
+ .library(name: "Swifter", targets: ["Swifter"]),
+ .executable(name: "SwifterExample", targets: ["SwifterExample"])
+ ],
+
+ dependencies: [],
+
+ targets: [
+ .target(
+ name: "Swifter",
+ dependencies: [],
+ path: "Xcode/Sources"
+ ),
+
+ .target(
+ name: "SwifterExample",
+ dependencies: [
+ "Swifter"
+ ],
+ path: "SwifterExample"
+ ),
+
+ .testTarget(
+ name: "SwifterTests",
+ dependencies: [
+ "Swifter"
+ ],
+ path: "Xcode/Tests"
+ )
+ ]
+)
diff --git a/Swifter.podspec b/Swifter.podspec
index 73b4a501..bedb6d62 100644
--- a/Swifter.podspec
+++ b/Swifter.podspec
@@ -12,5 +12,6 @@ Pod::Spec.new do |s|
s.source = { :git => "https://github.com/httpswift/swifter.git", :tag => "1.5.0" }
s.source_files = 'Xcode/Sources/*.{swift}'
s.swift_version = '5.0'
+ s.resource_bundles = {'Swifter' => ['Xcode/Resources/PrivacyInfo.xcprivacy']}
end
diff --git a/Xcode/Resources/PrivacyInfo.xcprivacy b/Xcode/Resources/PrivacyInfo.xcprivacy
new file mode 100644
index 00000000..fe840a04
--- /dev/null
+++ b/Xcode/Resources/PrivacyInfo.xcprivacy
@@ -0,0 +1,17 @@
+
+
+
+
+ NSPrivacyAccessedAPITypes
+
+
+ NSPrivacyAccessedAPIType
+ NSPrivacyAccessedAPICategoryFileTimestamp
+ NSPrivacyAccessedAPITypeReasons
+
+ C617.1
+
+
+
+
+
diff --git a/Xcode/Swifter.xcodeproj/project.pbxproj b/Xcode/Swifter.xcodeproj/project.pbxproj
index ce264f99..fbf06d95 100644
--- a/Xcode/Swifter.xcodeproj/project.pbxproj
+++ b/Xcode/Swifter.xcodeproj/project.pbxproj
@@ -48,6 +48,8 @@
269B47981D3AAAE20042D137 /* Errno.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C76B2A11D369C9D00D35BFB /* Errno.swift */; };
269B47991D3AAAE20042D137 /* String+BASE64.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C76B6F61D2C44F30030FC98 /* String+BASE64.swift */; };
269B47A71D3AAC4F0042D137 /* SwiftertvOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 269B47A51D3AAC4F0042D137 /* SwiftertvOS.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 3768D9FA2BA7884700A70E4E /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 3768D9F92BA7884700A70E4E /* PrivacyInfo.xcprivacy */; };
+ 3768D9FB2BA7884700A70E4E /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 3768D9F92BA7884700A70E4E /* PrivacyInfo.xcprivacy */; };
39BFCFFA26E4F0A000A6D7BF /* FilesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39BFCFF926E4F0A000A6D7BF /* FilesTests.swift */; };
39BFCFFB26E4F0A000A6D7BF /* FilesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39BFCFF926E4F0A000A6D7BF /* FilesTests.swift */; };
39BFCFFC26E4F0A000A6D7BF /* FilesTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39BFCFF926E4F0A000A6D7BF /* FilesTests.swift */; };
@@ -177,6 +179,7 @@
269B47A11D3AAAE20042D137 /* Swifter.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Swifter.framework; sourceTree = BUILT_PRODUCTS_DIR; };
269B47A41D3AAC4F0042D137 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
269B47A51D3AAC4F0042D137 /* SwiftertvOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SwiftertvOS.h; sourceTree = ""; };
+ 3768D9F92BA7884700A70E4E /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; };
39BFCFF926E4F0A000A6D7BF /* FilesTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FilesTests.swift; sourceTree = ""; };
540CA839228F275B00A3AF9B /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; };
540CA83A228F275B00A3AF9B /* CHANGELOG.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = CHANGELOG.md; path = ../CHANGELOG.md; sourceTree = ""; };
@@ -408,6 +411,7 @@
7CA4815619A2EF2B0030B30D /* Resources */ = {
isa = PBXGroup;
children = (
+ 3768D9F92BA7884700A70E4E /* PrivacyInfo.xcprivacy */,
7CB102DF1A17381D00CBA3B4 /* logo.png */,
);
path = Resources;
@@ -723,6 +727,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 3768D9FB2BA7884700A70E4E /* PrivacyInfo.xcprivacy in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -740,6 +745,7 @@
7AE8940D1C05151100A29F63 /* Launch Screen.storyboard in Resources */,
7CB102E01A17381D00CBA3B4 /* logo.png in Resources */,
7CDAB8141BE2A1D400C8A977 /* Images.xcassets in Resources */,
+ 3768D9FA2BA7884700A70E4E /* PrivacyInfo.xcprivacy in Resources */,
7CDAB8131BE2A1D400C8A977 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
diff --git a/Xcode/Tests/FilesTests.swift b/Xcode/Tests/FilesTests.swift
index 1f884844..2c82e5d8 100644
--- a/Xcode/Tests/FilesTests.swift
+++ b/Xcode/Tests/FilesTests.swift
@@ -55,7 +55,7 @@ class FilesTests: XCTestCase {
let closure = shareFile(temporaryDirectoryURL.appendingPathComponent("does_not_exist").path)
let result = closure(request)
- XCTAssert(result == .notFound)
+ XCTAssert(result == .notFound())
}
func testShareFilesFromDirectory() {
@@ -77,7 +77,7 @@ class FilesTests: XCTestCase {
let closure = shareFilesFromDirectory(temporaryDirectoryURL.path)
let result = closure(request)
- XCTAssert(result == .notFound)
+ XCTAssert(result == .notFound())
}
func testDirectoryBrowser() {
@@ -95,6 +95,6 @@ class FilesTests: XCTestCase {
let closure = directoryBrowser(temporaryDirectoryURL.path)
let result = closure(request)
- XCTAssert(result == .notFound)
+ XCTAssert(result == .notFound())
}
}