Skip to content

Commit 94f6c11

Browse files
authored
GH-111: Add Privacy Manifest in Kronos (#112)
- 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 <[email protected]>
1 parent a46542c commit 94f6c11

File tree

5 files changed

+36
-2
lines changed

5 files changed

+36
-2
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ xcuserdata
2727
Packages/
2828

2929
bazel-*
30+
31+
# Swift Package Manager
32+
.swiftpm/

Kronos.podspec

+2
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ Pod::Spec.new do |s|
1313
s.tvos.deployment_target = '12.0'
1414

1515
s.source_files = 'Sources/*.swift'
16+
17+
s.resource_bundles = {'Kronos' => ['Source/PrivacyInfo.xcprivacy']}
1618
end

Kronos.xcodeproj/project.pbxproj

+2
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
26447D861D6E54FF00159BEE /* DNSResolverTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DNSResolverTests.swift; sourceTree = "<group>"; };
5050
26447D871D6E54FF00159BEE /* NTPClientTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NTPClientTests.swift; sourceTree = "<group>"; };
5151
26447D881D6E54FF00159BEE /* NTPPacketTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NTPPacketTests.swift; sourceTree = "<group>"; };
52+
5DB5A05F2BAAF67D0069CCF9 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
5253
930B39DC2051E6D300360BA2 /* TimeStorage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TimeStorage.swift; sourceTree = "<group>"; };
5354
930B39DE2051F25300360BA2 /* TimeStorageTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TimeStorageTests.swift; sourceTree = "<group>"; };
5455
C20174831BD5509D00E4FE18 /* Kronos.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Kronos.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -122,6 +123,7 @@
122123
26447D7A1D6E54D400159BEE /* NTPProtocol.swift */,
123124
26447D7B1D6E54D400159BEE /* TimeFreeze.swift */,
124125
930B39DC2051E6D300360BA2 /* TimeStorage.swift */,
126+
5DB5A05F2BAAF67D0069CCF9 /* PrivacyInfo.xcprivacy */,
125127
);
126128
path = Sources;
127129
sourceTree = "<group>";

Package.swift

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.0
1+
// swift-tools-version:5.3
22
import PackageDescription
33

44
let package = Package(
@@ -7,7 +7,11 @@ let package = Package(
77
.library(name: "Kronos", targets: ["Kronos"]),
88
],
99
targets: [
10-
.target(name: "Kronos", path: "Sources"),
10+
.target(
11+
name: "Kronos",
12+
path: "Sources",
13+
resources: [.process("PrivacyInfo.xcprivacy")]
14+
),
1115
.testTarget(name: "KronosTests", dependencies: ["Kronos"]),
1216
]
1317
)

Sources/PrivacyInfo.xcprivacy

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>NSPrivacyAccessedAPITypes</key>
6+
<array>
7+
<dict>
8+
<key>NSPrivacyAccessedAPIType</key>
9+
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
10+
<key>NSPrivacyAccessedAPITypeReasons</key>
11+
<array>
12+
<string>CA92.1</string>
13+
</array>
14+
</dict>
15+
</array>
16+
<key>NSPrivacyCollectedDataTypes</key>
17+
<array/>
18+
<key>NSPrivacyTrackingDomains</key>
19+
<array/>
20+
<key>NSPrivacyTracking</key>
21+
<false/>
22+
</dict>
23+
</plist>

0 commit comments

Comments
 (0)