Fscalendar: Add package.swift manifest to support Swift Package manager

Created on 26 Nov 2019  路  11Comments  路  Source: WenchaoD/FSCalendar

Request report

Integrate library with Swift Package Manager

  • Bug description: Cannot integrate dependency package through Swift Package Manager
  • Integration method.Swift Package Manager
  • Xcode version. Xcode 11.2.1
  • FSCalendar version. 2.8.0
enhancement

Most helpful comment

Would like to request for this. Thanks

All 11 comments

I would like to see this supported. Thanks

what happened?

Would like to request for this. Thanks

Would like to request for this. Thanks

Are you open to a PR from someone adding this?

Does this PR work? If not, would someone submit a PR for this?

@WenchaoD I don't believe it will work as it's currently written.

I get the same error another Dev mentions in the comments about Swift's inability to see FSCalendar. The exact message that PR throws is Cannot find type 'FSCalendar' in scope

I'm looking at that PR today to see if I can get it over the finish line.

+1 for this. Have you had any luck? FSCalendar is great, and it's the last package in my current project that doesn't support SwiftPM.

@CristianMoisei Slowly getting there.

I'm digging into how to expose the FSCalendar Type once the package is imported. At the moment, using that other PR as a starting point, there is a naming collision between the module FSCalendar and the type FSCalendar. I'm trying to figure out how to pull the module and type apart al la the SPM file when the library is objective-c.

Not finding a lot of great documentation on exposing an objective-c library to a swift Xcode project via Swift Package Manager. So piecing it together as best I can.

Happy for any links you can send my way!!

@CristianMoisei Slowly getting there.

I'm digging into how to expose the FSCalendar Type once the package is imported. At the moment, using that other PR as a starting point, there is a naming collision between the module FSCalendar and the type FSCalendar. I'm trying to figure out how to pull the module and type apart al la the SPM file when the library is objective-c.

Not finding a lot of great documentation on exposing an objective-c library to a swift Xcode project via Swift Package Manager. So piecing it together as best I can.

Happy for any links you can send my way!!

I'm sorry, but I'm not familiar with making pods, so I can't do much to help. I was just curious how it's going.

I've managed to get SPM kinda working in my fork. I've had to rearrange the source files in line with the SPM standards though. I think, although I'm not certain, that it would be possible to get it working without rearrange the sources if you instead wrote a custom modulemap file.

I also haven't been able to get the Swift example project to build. I can't figure out how to get Xcode to add FSCalendar as a local Swift package. However it does work as you'd expect if you create a new Xcode project and drag it in as a local package, or add it from my fork in the usual manner.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

garudaonekh picture garudaonekh  路  4Comments

kunass2 picture kunass2  路  4Comments

StanleySathler picture StanleySathler  路  5Comments

GDXRepo picture GDXRepo  路  3Comments

ghost picture ghost  路  5Comments