From 7f4e82d3cdec0fc19c123ba18dafd0eed2f564b5 Mon Sep 17 00:00:00 2001 From: armin Date: Sun, 27 Jun 2021 13:51:26 +0430 Subject: [PATCH] Added Support for SPM(Swift Package Manager) --- .gitignore | 2 ++ Package.swift | 29 +++++++++++++++++++++++++++++ Source/Helpers.swift | 1 + Source/StickerSet.swift | 1 + 4 files changed, 33 insertions(+) create mode 100644 Package.swift diff --git a/.gitignore b/.gitignore index b957ede..5cafd86 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ # Xcode build/ +.build/ +.swiftpm/ *.pbxuser !default.pbxuser *.mode1v3 diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..98e6dd7 --- /dev/null +++ b/Package.swift @@ -0,0 +1,29 @@ +// swift-tools-version:5.0 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "TelegramStickersImport", + platforms: [ + .iOS(.v9) + ], + products: [ + // Products define the executables and libraries a package produces, and make them visible to other packages. + .library( + name: "TelegramStickersImport", + targets: ["TelegramStickersImport"]), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + // .package(url: /* package url */, from: "1.0.0"), + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages this package depends on. + .target( + name: "TelegramStickersImport", + dependencies: [], + path: "Source"), + ] +) diff --git a/Source/Helpers.swift b/Source/Helpers.swift index b4770f9..d24dbb7 100644 --- a/Source/Helpers.swift +++ b/Source/Helpers.swift @@ -1,4 +1,5 @@ import Foundation +import UIKit public extension Sticker.StickerData { init?(image: UIImage) { diff --git a/Source/StickerSet.swift b/Source/StickerSet.swift index d1c23c7..1bf689c 100644 --- a/Source/StickerSet.swift +++ b/Source/StickerSet.swift @@ -1,4 +1,5 @@ import Foundation +import UIKit /// A sticker set public class StickerSet {