From 24d9af21d7cdb3dbc68917ed664f2a7f70201393 Mon Sep 17 00:00:00 2001 From: CodingIran Date: Thu, 14 Mar 2024 14:33:43 +0800 Subject: [PATCH 1/2] add PrivacyInfo.xcprivacy for SPM --- .../contents.xcworkspacedata | 7 ++++++ Package.swift | 12 ++++++---- Sources/PrivacyInfo.xcprivacy | 23 +++++++++++++++++++ 3 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata create mode 100644 Sources/PrivacyInfo.xcprivacy diff --git a/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Package.swift b/Package.swift index 84bae78..7ec8094 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.0 +// swift-tools-version:5.4 // // Package.swift // FileKit @@ -34,7 +34,8 @@ let package = Package( // Products define the executables and libraries produced by a package, and make them visible to other packages. .library( name: "FileKit", - targets: ["FileKit"]), + targets: ["FileKit"] + ), ], dependencies: [], targets: [ @@ -43,10 +44,13 @@ let package = Package( .target( name: "FileKit", dependencies: [], - path: "Sources"), + path: "Sources", + resources: [.copy("PrivacyInfo.xcprivacy")] + ), .testTarget( name: "FileKitTests", dependencies: ["FileKit"], - path: "Tests") + path: "Tests" + ), ] ) diff --git a/Sources/PrivacyInfo.xcprivacy b/Sources/PrivacyInfo.xcprivacy new file mode 100644 index 0000000..3f7ea5f --- /dev/null +++ b/Sources/PrivacyInfo.xcprivacy @@ -0,0 +1,23 @@ + + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + 0A2A.1 + + + + NSPrivacyCollectedDataTypes + + NSPrivacyTrackingDomains + + NSPrivacyTracking + + + From fbe2282cd8121778ad347110bbc282eba1517c0d Mon Sep 17 00:00:00 2001 From: CodingIran Date: Tue, 9 Apr 2024 11:06:11 +0800 Subject: [PATCH 2/2] add PrivacyInfo.xcprivacy for Cocoapods --- FileKit.podspec | 1 + Package.swift | 2 +- {Sources => Support}/PrivacyInfo.xcprivacy | 0 3 files changed, 2 insertions(+), 1 deletion(-) rename {Sources => Support}/PrivacyInfo.xcprivacy (100%) diff --git a/FileKit.podspec b/FileKit.podspec index 3cb9041..c6907fc 100644 --- a/FileKit.podspec +++ b/FileKit.podspec @@ -12,4 +12,5 @@ Pod::Spec.new do |s| s.tvos.deployment_target = '9.0' s.source = { :git => "https://github.com/nvzqz/FileKit.git", :tag => "v#{s.version}" } s.source_files = "Sources/*.swift" + s.resource_bundles = {'FileKit' => ['Support/PrivacyInfo.xcprivacy']} end diff --git a/Package.swift b/Package.swift index 7ec8094..3763a85 100644 --- a/Package.swift +++ b/Package.swift @@ -45,7 +45,7 @@ let package = Package( name: "FileKit", dependencies: [], path: "Sources", - resources: [.copy("PrivacyInfo.xcprivacy")] + resources: [.copy("Support/PrivacyInfo.xcprivacy")] ), .testTarget( name: "FileKitTests", diff --git a/Sources/PrivacyInfo.xcprivacy b/Support/PrivacyInfo.xcprivacy similarity index 100% rename from Sources/PrivacyInfo.xcprivacy rename to Support/PrivacyInfo.xcprivacy