pavankataria / SwiftDataTables

A Swift Data Table package, display grid-like data sets in a nicely formatted table for iOS. Subclassing UICollectionView that allows ordering, and searching with extensible options.
MIT License
448 stars 69 forks source link

Carthage fix #42

Closed madhavajay closed 5 years ago

madhavajay commented 5 years ago

The ability to use Carthage doesn't work and this PR fixes it.

The code and bundle have been added to an iOS Framework which is the way that Carthage currently works.

I have not tested the other Packaging methods, so that should be checked first to make sure this doesn't break anything.

pavankataria commented 5 years ago

Hey, thanks for this. Did you enable a checkmark to get this working? Thats how another contributor did it before cc @Hais perhaps you could cross check this when you can, oh Carthage wiz?

madhavajay commented 5 years ago

@pavankataria are you able to test that cocoapods still works with this branch?

pavankataria commented 5 years ago

This shouldn't affect cocoapods since the SwiftDataTables folder is still there with all it's class files. When you say you've moved the files I don't actually see any files having been moved? I can however see a framework that's been created which is only viewable from xcode.

Is this what you intended? Did you actually physically move any files? Also, does carthage just try to find this very framework when you point a branch url in the cartfile?

madhavajay commented 5 years ago

@pavankataria no the files have not moved in the file system, only in the Xcode Project. So they are no longer built with the example app target but instead with the iOS framework which is then included in the app target. So everything should be fine.

madhavajay commented 5 years ago

You can really easily test that this works by installing Carthage:

$ brew install carthage

Then making a test Cartfile

$ mkdir testproj
$ cd testproj
$ touch Cartfile

Cartfile contents

github "pavankataria/SwiftDataTables"

Then run:

$ carthage update

You will see this error:

Dependency "SwiftDataTables" has no shared framework schemes

Then switch to this branch:

github "madhavajay/SwiftDataTables" "carthage-fix"

And it should work! :)

madhavajay commented 5 years ago

Even better you can add this to your CI steps so that the carthage frameworks are built every time on CI testing. 👍