iabudiab / HTMLKit

An Objective-C framework for your everyday HTML needs.
MIT License
239 stars 27 forks source link

Swift 2.3 - Build Issue #1

Closed vsavic closed 7 years ago

vsavic commented 7 years ago

I installed your library as you suggested by using cocoa-pods, but after I tried to include it in my project in my bridge-header I keep getting bunch of errors that these *.h files like HTMLElement.h etc. does not exist, even doe I see them in pod folder. Any idea why?

I'm using XCode 8 and Swift 2.3.

UPDATE What I had to do to make it works (for now), I had to mark each of these "missing" files as "public" in cocoa-pod.

iabudiab commented 7 years ago

You don't have to change anything in the CocoaPod in order for it to work. Here are some things you could check to troubleshoot the problem:

Let me know if this helps.

vsavic commented 7 years ago

When I try to add it like that just with import HTMLKit, this is what I get:

http://image.prntscr.com/image/937e20c6fc8b4104bc5b528899538be5.png

iabudiab commented 7 years ago

Do you have a swift project? and are you opening the workspace that was generated by CocoaPods?

vsavic commented 7 years ago

Yes I'm opening workspace. And yes I have a swift project, which was in swift 2 and now migrated to swift 2.3

iabudiab commented 7 years ago

Take a look a this demo project. It is a fresh Xcode 8 iOS project using legacy Swift (2.3) with a Podfile having HTMLKit. HTMLKitDemo.tar.gz

In the ViewController.swift you'll find a minimalistic example of it in action. Let me know if your setup is different.

vsavic commented 7 years ago

The only difference was pod version, you have 1.0 and I had 0.9.4. Everything else is the same... But for some reason, when I install this it does not work even with new version 1.0. But your project works...very strange, everything else is the same.

iabudiab commented 7 years ago

Either version should work fine.

And since it helps more often than anyone cares to admit, perform a complete clean (command + alt + shift + k) then build again.

vsavic commented 7 years ago

All good my friend! Thank you so much for your help! I was an idiot! ...the problem was with CocoaPods version....not with your pod version, but with my CocoaPods version, I didn't notice which version it was, since I don't work with iOS very often, but now I just finished with update, and reinstall all pods again, and everything works like a charm!

You can close this issue and mark it as user issue :)

Excellent library BTW!

iabudiab commented 7 years ago

No problem, glad it worked out for you! And don't beat yourself up about it, this happens to everybody, sometimes on daily basis (looking at Angular2 and all it betas and routers ..)