-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Swift Package Manager #846
Conversation
@mtnbarreto |
let package = Package( | ||
name: "XLPagerTabStrip", | ||
platforms: [ | ||
.iOS(.v9), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SPM is only available from XCode 11
|
||
#if SWIFT_PACKAGE | ||
var bundle = Bundle.module | ||
#else | ||
var bundle = Bundle(for: ButtonBarViewCell.self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can put your #endif
here
var bundle = Bundle(for: ButtonBarViewCell.self) | |
var bundle = Bundle(for: ButtonBarViewCell.self) | |
#endif |
var bundle = Bundle(for: ButtonBarViewCell.self) | ||
if let resourcePath = bundle.path(forResource: "XLPagerTabStrip", ofType: "bundle") { | ||
if let resourcesBundle = Bundle(path: resourcePath) { | ||
bundle = resourcesBundle | ||
} | ||
} | ||
|
||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#endif |
Sorry, my review was from November 2022, I don't know why it's publishing now 🤣 |
Hi @nk-5, thanks for contributing. We have added SPM support in another PR so I will close this. |
Motivation
want to use Swift Package Manager
Related issues
Changed
TODO