From aeef4f6943f2e99a117d4b5e7b5b4418bef5186f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihat=20G=C3=BCnd=C3=BCz?= Date: Mon, 8 Apr 2019 11:01:58 +0200 Subject: [PATCH 1/4] Add basic SwiftPM manifest file --- Package.swift | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Package.swift diff --git a/Package.swift b/Package.swift new file mode 100644 index 00000000..0a8ef611 --- /dev/null +++ b/Package.swift @@ -0,0 +1,16 @@ +// swift-tools-version:4.2 +import PackageDescription + +let package = Package( + name: "XLPagerTabStrip", + // platforms: [.iOS("9.3")], + products: [ + .library(name: "XLPagerTabStrip", targets: ["XLPagerTabStrip"]) + ], + targets: [ + .target( + name: "XLPagerTabStrip", + path: "Sources" + ) + ] +) From 41ff5a1358496869e388d2aeec29736909bc0d08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihat=20G=C3=BCnd=C3=BCz?= Date: Mon, 8 Apr 2019 11:05:17 +0200 Subject: [PATCH 2/4] [README] Document support & installation via Accio --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 40fb0171..1e311e81 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ Platform iOS Swift 4 compatible Carthage compatible +Accio supported CocoaPods compatible License: MIT @@ -318,6 +319,29 @@ To install XLPagerTabStrip, simply add the following line to your Cartfile: github "xmartlabs/XLPagerTabStrip" ~> 8.1 ``` +### Accio + +[Accio](https://github.com/JamitLabs/Accio) is a SwiftPM based dependency manager with improvements over Carthage. + +To install XLPagerTabStrip, simply add the following to your Package.swift: + +```swift +.package(url: "https://github.com/xmartlabs/XLPagerTabStrip.git", .upToNextMajor(from: "9.0.0")), +``` + +Next, add `XLPagerTabStrip` to your App targets dependencies like so: + +```swift +.target( + name: "App", + dependencies: [ + "XLPagerTabStrip", + ] +), +``` + +Then run `accio update`. + ## FAQ #### How to change the visible child view controller programmatically From a5609e38708cd32d6530b4ac2a047f115d75f4e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihat=20G=C3=BCnd=C3=BCz?= Date: Mon, 8 Apr 2019 11:11:03 +0200 Subject: [PATCH 3/4] [Package.swift] Point sources to Swift-only files This step is required due to restrictions of SwiftPM not allowing mixed language projects. A future improvent that prevents needing this workaround would be to put all ObjC files into their own directory and list that directory within the `exclude` parameter. --- Package.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 0a8ef611..61b0e122 100644 --- a/Package.swift +++ b/Package.swift @@ -10,7 +10,8 @@ let package = Package( targets: [ .target( name: "XLPagerTabStrip", - path: "Sources" + path: "Sources", + sources: ["Sources/PagerTabStripViewController.swift"] ) ] ) From c8defd527b9656f623b24354f26064ceb841f35b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cihat=20G=C3=BCnd=C3=BCz?= Date: Mon, 8 Apr 2019 11:15:15 +0200 Subject: [PATCH 4/4] [Package.swift] Properly fix mixed language source files issue --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index 61b0e122..db593539 100644 --- a/Package.swift +++ b/Package.swift @@ -11,7 +11,7 @@ let package = Package( .target( name: "XLPagerTabStrip", path: "Sources", - sources: ["Sources/PagerTabStripViewController.swift"] + exclude: ["FXPageControl.h", "FXPageControl.m"] ) ] )