ElaWorkshop / TagListView

Simple and highly customizable iOS tag list view, in Swift.
MIT License
2.64k stars 492 forks source link

Drag into project, then swift compile error #188

Closed CACRogerWang closed 6 years ago

CACRogerWang commented 6 years ago

Problem : Swift compiler error in TagView .

2018-06-27 6 51 00

I use cocoaPods in my project, but I need some customize in TagListView.
So I drag TagListView folder in my project. Then Swift compiler error... ( use Swift 4.1)

CACRogerWang commented 6 years ago

I create a folder references, then swift compile pass.

2018-06-27 8 36 42

using "create a folder references" is incorrect!!!

I reopen this issue. I still find the answer.

Cee commented 6 years ago

What do you mean "Swift Compile Error"? Fails to compile TagListView?

CACRogerWang commented 6 years ago

I drag TagListView into my project, then build it. The Errors show up.

2018-06-28 9 50 38

I guess there are some dependences issue in my project. Because I create a new project, it is work perfect.

Cee commented 6 years ago

Could you provide the smallest sample project which would cause this error?

CACRogerWang commented 6 years ago

I found the reason. I use SwifterSwift in my project.
SwifterSwift is installed by CocoaPods and is global in my project.

It's cause overriding non-open var outside of its defining module in TagView.

I can not reproduce the global SwifterSwift to show the problem. I only can import SwifterSwift in TagView to reproduce the error.

Error_Sample.zip

Cee commented 6 years ago

@CACRogerWang Could you use CocoaPods to manage all of your external packages?

aquarhead commented 6 years ago

If you need to customize a package, just fork it and push your changes to your fork.

You can specify git repo in the Podfile, as documented here.