From 6914adeb88b7edda1cbb2f28739d24172980624e Mon Sep 17 00:00:00 2001 From: Minh Nguyen Cong Date: Wed, 27 Mar 2024 06:53:31 +0100 Subject: [PATCH 1/2] feat: Add privacy manifest files --- PrivacyInfo.xcprivacy | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 PrivacyInfo.xcprivacy diff --git a/PrivacyInfo.xcprivacy b/PrivacyInfo.xcprivacy new file mode 100644 index 00000000..cfbe279c --- /dev/null +++ b/PrivacyInfo.xcprivacy @@ -0,0 +1,8 @@ + + + + + NSPrivacyTracking + + + From c1e6151f244595ad0a31d7071a46f14029af354e Mon Sep 17 00:00:00 2001 From: Artur Jankowski Date: Fri, 5 Apr 2024 15:51:49 +0200 Subject: [PATCH 2/2] Fixes --- BoxSDK.podspec | 4 +-- BoxSDK.xcodeproj/project.pbxproj | 4 +++ Package.swift | 8 +++-- PrivacyInfo.xcprivacy | 8 ----- Sources/BoxSDK+Async.swift | 2 +- Sources/Core/AsyncHelper.swift | 2 +- Sources/Core/BoxJSONDecoder.swift | 2 +- Sources/Core/MimeTypeProvider.swift | 2 +- Sources/Modules/FoldersModule+Async.swift | 2 +- Sources/Network/PagingIterator+Async.swift | 2 +- Sources/PrivacyInfo.xcprivacy | 40 ++++++++++++++++++++++ 11 files changed, 57 insertions(+), 19 deletions(-) delete mode 100644 PrivacyInfo.xcprivacy create mode 100644 Sources/PrivacyInfo.xcprivacy diff --git a/BoxSDK.podspec b/BoxSDK.podspec index 9aa751a9..06136d45 100644 --- a/BoxSDK.podspec +++ b/BoxSDK.podspec @@ -11,13 +11,13 @@ Pod::Spec.new do |spec| spec.social_media_url = "https://twitter.com/box" spec.ios.deployment_target = "11.0" spec.source = { :git => "https://github.com/box/box-ios-sdk.git", :tag => "v"+spec.version.to_s } - spec.swift_versions = ["5.0", "5.1", "5.2", "5.3", "5.4", "5.5"] + spec.swift_versions = ["5"] spec.requires_arc = true spec.default_subspec = "Core" spec.subspec "Core" do |ss| ss.source_files = "Sources/**/*.swift" , "Sources/**/Environment.plist" - # spec.exclude_files = "Sources/Exclude" + ss.resource_bundle = {"BoxSDK" => "Sources/PrivacyInfo.xcprivacy"} ss.framework = "Foundation" end end diff --git a/BoxSDK.xcodeproj/project.pbxproj b/BoxSDK.xcodeproj/project.pbxproj index b360c6bf..817a63cf 100644 --- a/BoxSDK.xcodeproj/project.pbxproj +++ b/BoxSDK.xcodeproj/project.pbxproj @@ -57,6 +57,7 @@ 05610A9927107079009F92CC /* SignRequestCreateParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05610A9827107079009F92CC /* SignRequestCreateParameters.swift */; }; 05610A9B271099A7009F92CC /* SignRequestPrefillTag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05610A9A271099A7009F92CC /* SignRequestPrefillTag.swift */; }; 05610A9D27109BFB009F92CC /* SignRequestSignerInput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05610A9C27109BFB009F92CC /* SignRequestSignerInput.swift */; }; + 056290D12BC03AB0008C2BEE /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 056290D02BC03AAF008C2BEE /* PrivacyInfo.xcprivacy */; }; 056B628B2860C16F008E9418 /* SharedLinkDataSpecs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 056B628A2860C16F008E9418 /* SharedLinkDataSpecs.swift */; }; 0571FC6328F7FA07004846E4 /* WebhooksModuleIntegrationSpecs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0571FC6228F7FA07004846E4 /* WebhooksModuleIntegrationSpecs.swift */; }; 0571FC6728F9491D004846E4 /* QuickSpec+Webhooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0571FC6628F9491D004846E4 /* QuickSpec+Webhooks.swift */; }; @@ -684,6 +685,7 @@ 05610A9827107079009F92CC /* SignRequestCreateParameters.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignRequestCreateParameters.swift; sourceTree = ""; }; 05610A9A271099A7009F92CC /* SignRequestPrefillTag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignRequestPrefillTag.swift; sourceTree = ""; }; 05610A9C27109BFB009F92CC /* SignRequestSignerInput.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignRequestSignerInput.swift; sourceTree = ""; }; + 056290D02BC03AAF008C2BEE /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 056B628A2860C16F008E9418 /* SharedLinkDataSpecs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SharedLinkDataSpecs.swift; sourceTree = ""; }; 056FE12726EF6F6800098F00 /* Quick.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Quick.xcframework; path = Carthage/Build/Quick.xcframework; sourceTree = ""; }; 056FE12826EF6F6800098F00 /* OHHTTPStubs.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = OHHTTPStubs.xcframework; path = Carthage/Build/OHHTTPStubs.xcframework; sourceTree = ""; }; @@ -2080,6 +2082,7 @@ 3549BB541DA38A4000C63030 /* Supporting Files */ = { isa = PBXGroup; children = ( + 056290D02BC03AAF008C2BEE /* PrivacyInfo.xcprivacy */, 3549BB181DA3890B00C63030 /* BoxSDK.h */, 3549BB171DA3890B00C63030 /* Info.plist */, 3549BB551DA38A5E00C63030 /* Info-tvOS.plist */, @@ -2611,6 +2614,7 @@ B40558B025AD2ABF0068784E /* ZipDownload.json in Resources */, B4882E7325EEFBC600EB57BA /* FolderLocks.json in Resources */, 8093D29822FA398500DB628E /* GetWebLink.json in Resources */, + 056290D12BC03AB0008C2BEE /* PrivacyInfo.xcprivacy in Resources */, B47486CA26013A30005F4475 /* CreateMetadataTemplate2.json in Resources */, B4882E7025EEE12F00EB57BA /* FolderLock.json in Resources */, 8093D29A22FA399D00DB628E /* UpdateWebLink.json in Resources */, diff --git a/Package.swift b/Package.swift index fc51b2b2..4b5ef189 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.0 +// swift-tools-version:5.3 // // BoxSDK.swift // BoxSDK @@ -25,12 +25,14 @@ let package = Package( .target( name: "BoxSDK", dependencies: [], - path: "Sources" + path: "Sources", + resources: [.copy("PrivacyInfo.xcprivacy")] ), .testTarget( name: "BoxSDKTests", dependencies: ["BoxSDK"], path: "Tests" ) - ] + ], + swiftLanguageVersions: [.v5] ) diff --git a/PrivacyInfo.xcprivacy b/PrivacyInfo.xcprivacy deleted file mode 100644 index cfbe279c..00000000 --- a/PrivacyInfo.xcprivacy +++ /dev/null @@ -1,8 +0,0 @@ - - - - - NSPrivacyTracking - - - diff --git a/Sources/BoxSDK+Async.swift b/Sources/BoxSDK+Async.swift index e4301e4c..d6381367 100644 --- a/Sources/BoxSDK+Async.swift +++ b/Sources/BoxSDK+Async.swift @@ -11,7 +11,7 @@ #endif import Foundation -@available(iOS 13.0, *) +@available(iOS 13.0, macOS 10.15, *) public extension BoxSDK { // MARK: - JWT Client diff --git a/Sources/Core/AsyncHelper.swift b/Sources/Core/AsyncHelper.swift index f28efda4..9263be76 100644 --- a/Sources/Core/AsyncHelper.swift +++ b/Sources/Core/AsyncHelper.swift @@ -9,7 +9,7 @@ import Foundation /// Provides method for converting Callback based API into an async API -@available(iOS 13.0, *) +@available(iOS 13.0, macOS 10.15, *) public enum AsyncHelper { /// Converting a Callback based API into an async API. diff --git a/Sources/Core/BoxJSONDecoder.swift b/Sources/Core/BoxJSONDecoder.swift index 9042c62d..a89f1c1b 100644 --- a/Sources/Core/BoxJSONDecoder.swift +++ b/Sources/Core/BoxJSONDecoder.swift @@ -144,7 +144,7 @@ enum BoxJSONDecoder { } #if compiler(>=5.9) - if #available(iOS 17.0, *) { + if #available(iOS 17.0, macOS 14.0, *) { guard let url = URL(string: value, encodingInvalidCharacters: false) else { throw BoxCodingError(message: .invalidValueFormat(key: key)) } diff --git a/Sources/Core/MimeTypeProvider.swift b/Sources/Core/MimeTypeProvider.swift index 9d368ae7..5c3b1c38 100644 --- a/Sources/Core/MimeTypeProvider.swift +++ b/Sources/Core/MimeTypeProvider.swift @@ -32,7 +32,7 @@ enum MimeTypeProvider { return defaultMimeType } - if #available(iOS 14, *) { + if #available(iOS 14, macOS 11.0, *) { return UTType(filenameExtension: pathExtension)?.preferredMIMEType ?? defaultMimeType } else { diff --git a/Sources/Modules/FoldersModule+Async.swift b/Sources/Modules/FoldersModule+Async.swift index 20b58ca6..6489eee2 100644 --- a/Sources/Modules/FoldersModule+Async.swift +++ b/Sources/Modules/FoldersModule+Async.swift @@ -8,7 +8,7 @@ import Foundation -@available(iOS 13.0, *) +@available(iOS 13.0, macOS 10.15, *) public extension FoldersModule { /// Get information about a folder. diff --git a/Sources/Network/PagingIterator+Async.swift b/Sources/Network/PagingIterator+Async.swift index c959dc26..a90acafc 100644 --- a/Sources/Network/PagingIterator+Async.swift +++ b/Sources/Network/PagingIterator+Async.swift @@ -9,7 +9,7 @@ import Foundation /// Provides paged iterator access for a collection of BoxModel's -@available(iOS 13.0, *) +@available(iOS 13.0, macOS 10.15, *) public extension PagingIterator { /// Gets next page of elements from the iterator diff --git a/Sources/PrivacyInfo.xcprivacy b/Sources/PrivacyInfo.xcprivacy new file mode 100644 index 00000000..fdca4d7f --- /dev/null +++ b/Sources/PrivacyInfo.xcprivacy @@ -0,0 +1,40 @@ + + + + + NSPrivacyTracking + + NSPrivacyTrackingDomains + + NSPrivacyCollectedDataTypes + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeUserID + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + NSPrivacyCollectedDataTypePurposeAnalytics + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeOtherDiagnosticData + NSPrivacyCollectedDataTypeLinked + + NSPrivacyCollectedDataTypeTracking + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + NSPrivacyAccessedAPITypes + + +