From df7b966eafceee32a8c6e172c3ab222882ce653a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Di=CC=81dac=20Coll?= Date: Wed, 20 Mar 2024 11:53:22 +0100 Subject: [PATCH] GH-111: Add Privacy Manifest in Kronos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add PrivacyInfo.xcprivacy to Kronos.xcoproj. - Add in the Privacy Manifest UserDefaults API with reason CA92.1. - Include PRivacyInfo.xcprivacy file in the Package.swift. - Upgrade minimum version of swift-tools-version to accept resources in Targets. - Include PrivacyInfo.xcprivacy file in Pods file. Signed-off-by: Dídac Coll --- .gitignore | 3 +++ Kronos.podspec | 2 ++ Kronos.xcodeproj/project.pbxproj | 2 ++ Package.swift | 8 ++++++-- Sources/PrivacyInfo.xcprivacy | 23 +++++++++++++++++++++++ 5 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 Sources/PrivacyInfo.xcprivacy diff --git a/.gitignore b/.gitignore index d92c566..ddf8fbf 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,6 @@ xcuserdata Packages/ bazel-* + +# Swift Package Manager +.swiftpm/ diff --git a/Kronos.podspec b/Kronos.podspec index 915065a..22c756b 100644 --- a/Kronos.podspec +++ b/Kronos.podspec @@ -13,4 +13,6 @@ Pod::Spec.new do |s| s.tvos.deployment_target = '12.0' s.source_files = 'Sources/*.swift' + + s.resource_bundles = {'Kronos' => ['Source/PrivacyInfo.xcprivacy']} end diff --git a/Kronos.xcodeproj/project.pbxproj b/Kronos.xcodeproj/project.pbxproj index cbb7197..31dc1e6 100644 --- a/Kronos.xcodeproj/project.pbxproj +++ b/Kronos.xcodeproj/project.pbxproj @@ -49,6 +49,7 @@ 26447D861D6E54FF00159BEE /* DNSResolverTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DNSResolverTests.swift; sourceTree = ""; }; 26447D871D6E54FF00159BEE /* NTPClientTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NTPClientTests.swift; sourceTree = ""; }; 26447D881D6E54FF00159BEE /* NTPPacketTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NTPPacketTests.swift; sourceTree = ""; }; + 5DB5A05F2BAAF67D0069CCF9 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 930B39DC2051E6D300360BA2 /* TimeStorage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TimeStorage.swift; sourceTree = ""; }; 930B39DE2051F25300360BA2 /* TimeStorageTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TimeStorageTests.swift; sourceTree = ""; }; C20174831BD5509D00E4FE18 /* Kronos.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Kronos.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -122,6 +123,7 @@ 26447D7A1D6E54D400159BEE /* NTPProtocol.swift */, 26447D7B1D6E54D400159BEE /* TimeFreeze.swift */, 930B39DC2051E6D300360BA2 /* TimeStorage.swift */, + 5DB5A05F2BAAF67D0069CCF9 /* PrivacyInfo.xcprivacy */, ); path = Sources; sourceTree = ""; diff --git a/Package.swift b/Package.swift index 8ad84d9..7a0076c 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.0 +// swift-tools-version:5.3 import PackageDescription let package = Package( @@ -7,7 +7,11 @@ let package = Package( .library(name: "Kronos", targets: ["Kronos"]), ], targets: [ - .target(name: "Kronos", path: "Sources"), + .target( + name: "Kronos", + path: "Sources", + resources: [.process("PrivacyInfo.xcprivacy")] + ), .testTarget(name: "KronosTests", dependencies: ["Kronos"]), ] ) diff --git a/Sources/PrivacyInfo.xcprivacy b/Sources/PrivacyInfo.xcprivacy new file mode 100644 index 0000000..0734d30 --- /dev/null +++ b/Sources/PrivacyInfo.xcprivacy @@ -0,0 +1,23 @@ + + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + CA92.1 + + + + NSPrivacyCollectedDataTypes + + NSPrivacyTrackingDomains + + NSPrivacyTracking + + +