diff --git a/BoxSDK.podspec b/BoxSDK.podspec index 9aa751a9c..06136d454 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 b360c6bf9..817a63cfc 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 fc51b2b26..4b5ef189e 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/Sources/BoxSDK+Async.swift b/Sources/BoxSDK+Async.swift index e4301e4ca..d63813671 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 f28efda4a..9263be761 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 9042c62da..a89f1c1bd 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 9d368ae71..5c3b1c387 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 20b58ca60..6489eee2f 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 c959dc26d..a90acafce 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 000000000..fdca4d7f0 --- /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 + + +