diff --git a/.gitignore b/.gitignore index 93c86d3..f1ff153 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,13 @@ Carthage/Build # `pod install` in .travis.yml # # Pods/ + +# Swift Package Manager +/.build +/Packages +xcuserdata/ +DerivedData/ +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc +Package.resolved diff --git a/Bootpay/Classes/config/BootpayBuildConfig.swift b/Bootpay/Classes/config/BootpayBuildConfig.swift index 5aef4a1..cfd00cd 100644 --- a/Bootpay/Classes/config/BootpayBuildConfig.swift +++ b/Bootpay/Classes/config/BootpayBuildConfig.swift @@ -7,10 +7,12 @@ #if os(macOS) +import AppKit public typealias BTNavigationController = NSPageController public typealias BTView = NSView public typealias BTViewController = NSViewController #elseif os(iOS) +import UIKit public typealias BTNavigationController = UINavigationController public typealias BTView = UIView public typealias BTViewController = UIViewController diff --git a/Bootpay/Classes/dialog/BootpayController.swift b/Bootpay/Classes/dialog/BootpayController.swift index 300c2fe..bd2430b 100644 --- a/Bootpay/Classes/dialog/BootpayController.swift +++ b/Bootpay/Classes/dialog/BootpayController.swift @@ -5,6 +5,8 @@ // Created by Taesup Yoon on 2021/05/12. // +import UIKit + class BootpayController: BTViewController { let bootpayWebView = BootpayWebView() diff --git a/Bootpay/Classes/extension/UIView.Extension.swift b/Bootpay/Classes/extension/UIView.Extension.swift index bc3ed97..e03e2ac 100644 --- a/Bootpay/Classes/extension/UIView.Extension.swift +++ b/Bootpay/Classes/extension/UIView.Extension.swift @@ -5,7 +5,7 @@ // Created by Taesup Yoon on 2022/06/03. // -import Foundation +import UIKit extension UIView { diff --git a/Bootpay/Classes/helper/DeviceHelper.swift b/Bootpay/Classes/helper/DeviceHelper.swift index 487aef5..5a18776 100644 --- a/Bootpay/Classes/helper/DeviceHelper.swift +++ b/Bootpay/Classes/helper/DeviceHelper.swift @@ -5,6 +5,8 @@ // Created by Taesup Yoon on 2021/12/09. // +import UIKit + enum DeviceHelper { case nativeMac case iPad diff --git a/Bootpay/Classes/models/BootExtra.swift b/Bootpay/Classes/models/BootExtra.swift index 9331cab..81800b0 100644 --- a/Bootpay/Classes/models/BootExtra.swift +++ b/Bootpay/Classes/models/BootExtra.swift @@ -4,6 +4,8 @@ // // Created by Taesup Yoon on 2021/05/10. // + +import Foundation import ObjectMapper diff --git a/Bootpay/Classes/models/BootItem.swift b/Bootpay/Classes/models/BootItem.swift index 1fff01c..f38791a 100644 --- a/Bootpay/Classes/models/BootItem.swift +++ b/Bootpay/Classes/models/BootItem.swift @@ -5,6 +5,7 @@ // Created by Taesup Yoon on 2021/05/10. // +import Foundation import ObjectMapper public class BootItem: NSObject, Mappable, Codable { diff --git a/Bootpay/Classes/models/BootOneStore.swift b/Bootpay/Classes/models/BootOneStore.swift index 7ad0912..c213481 100644 --- a/Bootpay/Classes/models/BootOneStore.swift +++ b/Bootpay/Classes/models/BootOneStore.swift @@ -5,6 +5,7 @@ // Created by Taesup Yoon on 2021/05/10. // +import Foundation import ObjectMapper public class BootOneStore: NSObject, Mappable, Codable { diff --git a/Bootpay/Classes/models/BootStatItem.swift b/Bootpay/Classes/models/BootStatItem.swift index a9d423f..2b7080f 100644 --- a/Bootpay/Classes/models/BootStatItem.swift +++ b/Bootpay/Classes/models/BootStatItem.swift @@ -5,6 +5,7 @@ // Created by Taesup Yoon on 2021/05/10. // +import Foundation import ObjectMapper public class BootpayStatItem: NSObject, Mappable, Codable { diff --git a/Bootpay/Classes/models/BootUser.swift b/Bootpay/Classes/models/BootUser.swift index e9c267d..b8d0132 100644 --- a/Bootpay/Classes/models/BootUser.swift +++ b/Bootpay/Classes/models/BootUser.swift @@ -5,6 +5,7 @@ // Created by Taesup Yoon on 2021/05/10. // +import Foundation import ObjectMapper public class BootUser: NSObject, Mappable, Codable { diff --git a/Bootpay/Classes/models/Payload.swift b/Bootpay/Classes/models/Payload.swift index 0a313a8..aecf258 100644 --- a/Bootpay/Classes/models/Payload.swift +++ b/Bootpay/Classes/models/Payload.swift @@ -5,6 +5,7 @@ // Created by Taesup Yoon on 2021/05/10. // +import Foundation import ObjectMapper open class Payload: NSObject, Mappable, Codable { diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..1939940 --- /dev/null +++ b/Package.swift @@ -0,0 +1,35 @@ +// swift-tools-version: 5.10 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "Bootpay", + platforms: [ + .macOS(.v12), .iOS(.v14), + ], + products: [ + // Products define the executables and libraries a package produces, making them visible to other packages. + .library( + name: "Bootpay", + targets: ["Bootpay"]), + ], + dependencies: [ + .package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", .upToNextMajor(from: "1.8.0")), + .package(url: "https://github.com/tristanhimmelman/ObjectMapper.git", .upToNextMajor(from: "4.4.0")), + .package(url: "https://github.com/ninjaprox/NVActivityIndicatorView.git", .upToNextMajor(from: "5.2.0")), + ], + targets: [ + // Targets are the basic building blocks of a package, defining a module or a test suite. + // Targets can depend on other targets in this package and products from dependencies. + .target( + name: "Bootpay", + dependencies: [ + .product(name: "CryptoSwift", package: "CryptoSwift"), + .product(name: "ObjectMapper", package: "ObjectMapper"), + .product(name: "NVActivityIndicatorView", package: "NVActivityIndicatorView"), + ], + path: "Bootpay/Classes" + ), + ] +)