diff --git a/Package.swift b/Package.swift index adcd6255..2e2020db 100644 --- a/Package.swift +++ b/Package.swift @@ -28,12 +28,13 @@ let package = Package( dependencies: ["BitByteData"], path: "Sources", exclude: ["swcomp"], - sources: ["Common", "7-Zip", "BZip2", "Deflate", "GZip", "LZ4", "LZMA", "LZMA2", "TAR", "XZ", "ZIP", "Zlib"]), + sources: ["Common", "7-Zip", "BZip2", "Deflate", "GZip", "LZ4", "LZMA", "LZMA2", "TAR", "XZ", "ZIP", "Zlib"], + resources: [.copy("PrivacyInfo.xcprivacy")]), .target( name: "swcomp", dependencies: ["SWCompression", "SwiftCLI"], path: "Sources", - exclude: ["Common", "7-Zip", "BZip2", "Deflate", "GZip", "LZ4", "LZMA", "LZMA2", "TAR", "XZ", "ZIP", "Zlib"], + exclude: ["Common", "7-Zip", "BZip2", "Deflate", "GZip", "LZ4", "LZMA", "LZMA2", "TAR", "XZ", "ZIP", "Zlib", "PrivacyInfo.xcprivacy"], sources: ["swcomp"]), ], swiftLanguageVersions: [.v5] diff --git a/SWCompression.podspec b/SWCompression.podspec index 94ee8f09..5e67ea49 100644 --- a/SWCompression.podspec +++ b/SWCompression.podspec @@ -27,57 +27,68 @@ Pod::Spec.new do |s| s.subspec "Deflate" do |sp| sp.source_files = "Sources/{Deflate/*,Common/*,Common/CodingTree/*}.swift" + sp.resource_bundles = {"SWCompression/Deflate" => ["Sources/PrivacyInfo.xcprivacy"]} sp.pod_target_xcconfig = { "OTHER_SWIFT_FLAGS" => "-DSWCOMPRESSION_POD_DEFLATE" } end s.subspec "GZip" do |sp| sp.dependency "SWCompression/Deflate" + sp.resource_bundles = {"SWCompression/GZip" => ["Sources/PrivacyInfo.xcprivacy"]} sp.source_files = "Sources/{GZip/*,Common/*}.swift" end s.subspec "Zlib" do |sp| sp.dependency "SWCompression/Deflate" + sp.resource_bundles = {"SWCompression/Zlib" => ["Sources/PrivacyInfo.xcprivacy"]} sp.source_files = "Sources/{Zlib/*,Common/*}.swift" end s.subspec "BZip2" do |sp| sp.source_files = "Sources/{BZip2/*,Common/*,Common/CodingTree/*}.swift" + sp.resource_bundles = {"SWCompression/BZip2" => ["Sources/PrivacyInfo.xcprivacy"]} sp.pod_target_xcconfig = { "OTHER_SWIFT_FLAGS" => "-DSWCOMPRESSION_POD_BZ2" } end s.subspec "LZMA" do |sp| sp.source_files = "Sources/{LZMA/*,Common/*}.swift" + sp.resource_bundles = {"SWCompression/LZMA" => ["Sources/PrivacyInfo.xcprivacy"]} sp.pod_target_xcconfig = { "OTHER_SWIFT_FLAGS" => "-DSWCOMPRESSION_POD_LZMA" } end s.subspec "LZMA2" do |sp| sp.dependency "SWCompression/LZMA" sp.source_files = "Sources/{LZMA2/*,Common/*}.swift" + sp.resource_bundles = {"SWCompression/LZMA2" => ["Sources/PrivacyInfo.xcprivacy"]} end s.subspec "LZ4" do |sp| sp.source_files = "Sources/{LZ4/*,Common/*}.swift" + sp.resource_bundles = {"SWCompression/LZ4" => ["Sources/PrivacyInfo.xcprivacy"]} sp.pod_target_xcconfig = { "OTHER_SWIFT_FLAGS" => "-DSWCOMPRESSION_POD_LZ4" } end s.subspec "XZ" do |sp| sp.dependency "SWCompression/LZMA2" sp.source_files = "Sources/{XZ/*,Common/*}.swift" + sp.resource_bundles = {"SWCompression/XZ" => ["Sources/PrivacyInfo.xcprivacy"]} end s.subspec "ZIP" do |sp| sp.dependency "SWCompression/Deflate" sp.source_files = "Sources/{Zip/*,Common/*,Common/Container/*}.swift" + sp.resource_bundles = {"SWCompression/ZIP" => ["Sources/PrivacyInfo.xcprivacy"]} sp.pod_target_xcconfig = { "OTHER_SWIFT_FLAGS" => "-DSWCOMPRESSION_POD_ZIP" } end s.subspec "TAR" do |sp| sp.source_files = "Sources/{TAR/*,Common/*,Common/Container/*}.swift" + sp.resource_bundles = {"SWCompression/TAR" => ["Sources/PrivacyInfo.xcprivacy"]} end s.subspec "SevenZip" do |sp| sp.dependency "SWCompression/LZMA2" sp.source_files = "Sources/{7-Zip/*,Common/*,Common/Container/*}.swift" + sp.resource_bundles = {"SWCompression/SevenZip" => ["Sources/PrivacyInfo.xcprivacy"]} sp.pod_target_xcconfig = { "OTHER_SWIFT_FLAGS" => "-DSWCOMPRESSION_POD_SEVENZIP" } end diff --git a/SWCompression.xcodeproj/project.pbxproj b/SWCompression.xcodeproj/project.pbxproj index 65151b1a..e718daa4 100644 --- a/SWCompression.xcodeproj/project.pbxproj +++ b/SWCompression.xcodeproj/project.pbxproj @@ -277,6 +277,7 @@ E6C4150726FE230A00F9D36F /* XxHash32.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6C4150626FE230A00F9D36F /* XxHash32.swift */; }; E6D86D2F26FE35C50032CFFA /* XxHash32Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6D86D2E26FE35C50032CFFA /* XxHash32Tests.swift */; }; E6DF9ECE2704BF14003BD91E /* test_multi_frame.lz4 in Resources */ = {isa = PBXBuildFile; fileRef = E6DF9ECD2704BF14003BD91E /* test_multi_frame.lz4 */; }; + E6E49D522BD5081D00BFC756 /* PrivacyInfo.xcprivacy in CopyFiles */ = {isa = PBXBuildFile; fileRef = E6E49D502BD507D700BFC756 /* PrivacyInfo.xcprivacy */; }; E6EDD6A826F7767F00884532 /* test_minor_version_3.7z in Resources */ = {isa = PBXBuildFile; fileRef = E6EDD6A626F7767E00884532 /* test_minor_version_3.7z */; }; E6EDD6A926F7767F00884532 /* test_minor_version_4.7z in Resources */ = {isa = PBXBuildFile; fileRef = E6EDD6A726F7767E00884532 /* test_minor_version_4.7z */; }; E6EDD6AC26F77C0E00884532 /* test_minor_version_2.7z in Resources */ = {isa = PBXBuildFile; fileRef = E6EDD6AB26F77C0E00884532 /* test_minor_version_2.7z */; }; @@ -292,6 +293,19 @@ }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + E6E49D512BD5081700BFC756 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 7; + files = ( + E6E49D522BD5081D00BFC756 /* PrivacyInfo.xcprivacy in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ 0602C8DE212184FA00B69EF5 /* LZMAProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LZMAProperties.swift; sourceTree = ""; }; 0606CF8020641209002B6EE9 /* BuiltinExtraFields.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BuiltinExtraFields.swift; sourceTree = ""; }; @@ -565,6 +579,7 @@ E6C4150626FE230A00F9D36F /* XxHash32.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XxHash32.swift; sourceTree = ""; }; E6D86D2E26FE35C50032CFFA /* XxHash32Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XxHash32Tests.swift; sourceTree = ""; }; E6DF9ECD2704BF14003BD91E /* test_multi_frame.lz4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = test_multi_frame.lz4; sourceTree = ""; }; + E6E49D502BD507D700BFC756 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = Sources/PrivacyInfo.xcprivacy; sourceTree = ""; }; E6EDD6A626F7767E00884532 /* test_minor_version_3.7z */ = {isa = PBXFileReference; lastKnownFileType = file; path = test_minor_version_3.7z; sourceTree = ""; }; E6EDD6A726F7767E00884532 /* test_minor_version_4.7z */ = {isa = PBXFileReference; lastKnownFileType = file; path = test_minor_version_4.7z; sourceTree = ""; }; E6EDD6AB26F77C0E00884532 /* test_minor_version_2.7z */ = {isa = PBXFileReference; lastKnownFileType = file; path = test_minor_version_2.7z; sourceTree = ""; }; @@ -680,6 +695,7 @@ 06BE1ABE1DB410F100EE0F59 = { isa = PBXGroup; children = ( + E6E49D502BD507D700BFC756 /* PrivacyInfo.xcprivacy */, 06BE1ACA1DB410F100EE0F59 /* Sources */, 06F065A01FFB763300312A82 /* Tests */, E631055A27086132006EACC3 /* SWCompression.xctestplan */, @@ -1111,6 +1127,7 @@ buildConfigurationList = 06BE1ADC1DB410F100EE0F59 /* Build configuration list for PBXNativeTarget "SWCompression" */; buildPhases = ( 06BE1AC31DB410F100EE0F59 /* Sources */, + E6E49D512BD5081700BFC756 /* CopyFiles */, ); buildRules = ( ); diff --git a/Sources/PrivacyInfo.xcprivacy b/Sources/PrivacyInfo.xcprivacy new file mode 100644 index 00000000..e08a130b --- /dev/null +++ b/Sources/PrivacyInfo.xcprivacy @@ -0,0 +1,14 @@ + + + + + NSPrivacyTracking + + NSPrivacyTrackingDomains + + NSPrivacyCollectedDataTypes + + NSPrivacyAccessedAPITypes + + +