From dcdfffbd350dce6d32a4eef164847c87739c72bd Mon Sep 17 00:00:00 2001 From: YufeiG <1757898+YufeiG@users.noreply.github.com> Date: Thu, 5 Aug 2021 19:28:18 -0700 Subject: [PATCH] Update Swift Package Manager config (#332) Make SwiftyDropbox work for Catalyst when used with SPM --- Package.resolved | 2 +- Package.swift | 8 +++++-- .../SwiftyDropbox_iOS/OAuthMobile.swift | 2 +- .../SwiftyDropbox_macOS/OAuthDesktop.swift | 2 +- .../Shared/Handwritten/SwiftyDropbox.h | 22 ------------------- .../SwiftyDropbox.xcodeproj/project.pbxproj | 6 ----- 6 files changed, 9 insertions(+), 33 deletions(-) delete mode 100644 Source/SwiftyDropbox/Shared/Handwritten/SwiftyDropbox.h diff --git a/Package.resolved b/Package.resolved index 6b5393321..20e547a35 100644 --- a/Package.resolved +++ b/Package.resolved @@ -6,7 +6,7 @@ "repositoryURL": "https://github.com/Alamofire/Alamofire.git", "state": { "branch": null, - "revision": "747c8db8d57b68d5e35275f10c92d55f982adbd4", + "revision": "f96b619bcb2383b43d898402283924b80e2c4bae", "version": "5.4.3" } } diff --git a/Package.swift b/Package.swift index 9fc39143e..48e7c8a0b 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.0 +// swift-tools-version:5.1 /// /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. /// @@ -7,11 +7,15 @@ import PackageDescription let package = Package( name: "SwiftyDropbox", + platforms: [ + .macOS(.v10_12), + .iOS(.v10), + ], products: [ .library(name: "SwiftyDropbox", targets:["SwiftyDropbox"]), ], dependencies: [ - .package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMinor(from: "5.4.3")), + .package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "5.4.3")), ], targets: [ .target( diff --git a/Source/SwiftyDropbox/Platform/SwiftyDropbox_iOS/OAuthMobile.swift b/Source/SwiftyDropbox/Platform/SwiftyDropbox_iOS/OAuthMobile.swift index 3d3d9ca34..0831eeccb 100644 --- a/Source/SwiftyDropbox/Platform/SwiftyDropbox_iOS/OAuthMobile.swift +++ b/Source/SwiftyDropbox/Platform/SwiftyDropbox_iOS/OAuthMobile.swift @@ -2,7 +2,7 @@ /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. /// -#if canImport(UIKit) +#if os(iOS) import Foundation import SafariServices diff --git a/Source/SwiftyDropbox/Platform/SwiftyDropbox_macOS/OAuthDesktop.swift b/Source/SwiftyDropbox/Platform/SwiftyDropbox_macOS/OAuthDesktop.swift index 5462d3170..465732302 100644 --- a/Source/SwiftyDropbox/Platform/SwiftyDropbox_macOS/OAuthDesktop.swift +++ b/Source/SwiftyDropbox/Platform/SwiftyDropbox_macOS/OAuthDesktop.swift @@ -2,7 +2,7 @@ /// Copyright (c) 2016 Dropbox, Inc. All rights reserved. /// -#if canImport(AppKit) +#if os(macOS) import Foundation import AppKit diff --git a/Source/SwiftyDropbox/Shared/Handwritten/SwiftyDropbox.h b/Source/SwiftyDropbox/Shared/Handwritten/SwiftyDropbox.h deleted file mode 100644 index 8f8d77ee6..000000000 --- a/Source/SwiftyDropbox/Shared/Handwritten/SwiftyDropbox.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// SwiftyDropbox.h -// SwiftyDropbox -// -// Copyright © 2016 Dropbox. All rights reserved. -// - -#import "TargetConditionals.h" - -#if TARGET_OS_IPHONE - #import -#else - #import -#endif - -//! Project version number for SwiftyDropbox. -FOUNDATION_EXPORT double SwiftyDropboxVersionNumber; - -//! Project version string for SwiftyDropbox. -FOUNDATION_EXPORT const unsigned char SwiftyDropboxVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import