nsomar / OAStackView

Porting UIStackView to iOS 7+
MIT License
2.14k stars 191 forks source link

Include of non-modular header inside framework module #85

Closed intonarumori closed 8 years ago

intonarumori commented 8 years ago

I have a pod that has OAStackView as a dependency here: https://github.com/intonarumori/RMAlertController

I have a Swift project that uses this pod with a Podfile like this:

platform: ios, '8.0'
use_frameworks!
pod 'RMAlertController', :git => 'https://github.com/intonarumori/RMAlertController', :branch => 'master'

After pod install or pod update I have the following compilation warnings: Include of non-modular header inside framework module 'OAStackView.OAStackView_Constraint'

The only way I was able to fix this was by changing the following import statements: #import <OAStackView/OAStackView.h> to #import "OAStackView.h" in multiple files (OAStackView+Hiding.h, OAStackView+Constraint.h, OAStackView+Traversal.h)

I'm still investigating other options but it would be worth checking which import option is really appropriate for full Swift interoperability. The simple import could work better if it doesn't break other installation.

Let me know what you think, thanks.

intonarumori commented 8 years ago

More information about the issue can be found here: https://github.com/CocoaPods/CocoaPods/issues/4420

It seems most libraries removed the angular imports. Ex. https://github.com/Mantle/Mantle/issues/626

intonarumori commented 8 years ago

Following the practice of other open source libraries I fixed the imports in this PR https://github.com/oarrabi/OAStackView/pull/86

delebedev commented 8 years ago

Thanks @intonarumori, looks like it works fine for my obj-c project too.