diff --git a/.gitignore b/.gitignore index c964cd8..6ac6f61 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ # Xcode # build/ +.build/ +.swiftpm/ *.pbxuser !default.pbxuser *.mode1v3 diff --git a/MBCircularProgressBar.podspec b/MBCircularProgressBar.podspec index d1bd503..49c4ac4 100644 --- a/MBCircularProgressBar.podspec +++ b/MBCircularProgressBar.podspec @@ -24,7 +24,7 @@ a circular animatable & Interface Builder highly customizable progress bar s.platform = :ios, '8.0' s.requires_arc = true - s.source_files = 'Pod/Classes/**/*' + s.source_files = 'Sources/**/*' s.resource_bundles = { 'MBCircularProgressBar' => ['Pod/Assets/*.png'] } diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..a95811c --- /dev/null +++ b/Package.swift @@ -0,0 +1,20 @@ +// swift-tools-version:5.3 +import PackageDescription + +let package = Package( + name: "MBCircularProgressBar", + platforms: [ + .iOS(.v9) + ], + products: [ + .library(name: "MBCircularProgressBar", targets: ["MBCircularProgressBar"]) + ], + targets: [ + .target( + name: "MBCircularProgressBar", + path: "Sources", + exclude: ["Example"], + publicHeadersPath: "." + ), + ] +) diff --git a/Pod/Classes/.gitkeep b/Pod/Classes/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/README.md b/README.md index bcb1dc0..b47acbe 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,17 @@ To run the example project, clone the repo, and run `pod update` from the Exampl ## Installation +### Swift Package Manager + +1. Add the following to your `Package.swift`: + ```swift + .package(url: "https://github.com/MatiBot/MBCircularProgressBar.git", .upToNextMajor(from: "0.3.4")), + ``` +2. Next, add `MBCircularProgressBar` to your App targets dependencies like so: + ```swift + .target(name: "App", dependencies: ["CircularProgressBar"]), + ``` + ### Cocoapods MBCircularProgressBar is available through [CocoaPods](http://cocoapods.org). diff --git a/Pod/Classes/MBCircularProgressBarLayer.h b/Sources/MBCircularProgressBarLayer.h similarity index 99% rename from Pod/Classes/MBCircularProgressBarLayer.h rename to Sources/MBCircularProgressBarLayer.h index 3465f00..073ac22 100644 --- a/Pod/Classes/MBCircularProgressBarLayer.h +++ b/Sources/MBCircularProgressBarLayer.h @@ -7,6 +7,7 @@ // @import QuartzCore; +@import UIKit; typedef NS_ENUM(NSInteger, MBCircularProgressBarAppearanceType) { MBCircularProgressBarAppearanceTypeOverlaysEmptyLine = 0, diff --git a/Pod/Classes/MBCircularProgressBarLayer.m b/Sources/MBCircularProgressBarLayer.m similarity index 100% rename from Pod/Classes/MBCircularProgressBarLayer.m rename to Sources/MBCircularProgressBarLayer.m diff --git a/Pod/Classes/MBCircularProgressBarView.h b/Sources/MBCircularProgressBarView.h similarity index 100% rename from Pod/Classes/MBCircularProgressBarView.h rename to Sources/MBCircularProgressBarView.h diff --git a/Pod/Classes/MBCircularProgressBarView.m b/Sources/MBCircularProgressBarView.m similarity index 100% rename from Pod/Classes/MBCircularProgressBarView.m rename to Sources/MBCircularProgressBarView.m