Skip to content
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

Closed
wants to merge 5 commits into from
Closed

Conversation

nk-5
Copy link

@nk-5 nk-5 commented Jul 29, 2022

Motivation

want to use Swift Package Manager

Related issues

Changed

  • Support Swift Package
    • Add Package.swift
    • ButtonBarViewCell load nib file divide from spm
  • Divide FXPageControl files and package
    • Add FXPageControl.podspec. and add dependency for XLPagerTabStrip.podspec

TODO

  • add SPM installation for README

@nk-5
Copy link
Author

nk-5 commented Aug 2, 2022

@mtnbarreto
Please review when you have time. 🙇

let package = Package(
name: "XLPagerTabStrip",
platforms: [
.iOS(.v9),
Copy link
Contributor

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)
Copy link
Contributor

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

Suggested change
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#endif

@Climbatize
Copy link
Contributor

Sorry, my review was from November 2022, I don't know why it's publishing now 🤣

@mats-claassen
Copy link
Member

Hi @nk-5, thanks for contributing. We have added SPM support in another PR so I will close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants