Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix non-modular header include error when imported from Swift #103

Closed

Conversation

Projects
None yet
1 participant
@banjun
Copy link

commented Apr 18, 2016

Xcode 7.3 emits include of non-modular header inside framework module error when RSDayFlow is imported from Swift.
Another Swift pod cannot depend on RSDayFlow pod because automatic lint on pod trunk push fails.

s.source_files = 'RSDayFlow' in the podspec includes all headers in RSDayFlow.h and thus they will be exported in the CocoaPods-generated RSDayFlow.modulemap. We can mark them as private headers in the podspec.

    - NOTE  | xcodebuild:  Target Support Files/RSDayFlow/RSDayFlow-umbrella.h:4:9: note: in file included from Target Support Files/RSDayFlow/RSDayFlow-umbrella.h:4:
    - ERROR | xcodebuild:  RSDayFlow/RSDayFlow/RSDayFlow.h:33:9: error: include of non-modular header inside framework module 'RSDayFlow.RSDayFlow'
    - ERROR | xcodebuild:  RSDayFlow/RSDayFlow/RSDayFlow.h:34:9: error: include of non-modular header inside framework module 'RSDayFlow.RSDayFlow'
    - ERROR | xcodebuild:  RSDayFlow/RSDayFlow/RSDayFlow.h:35:9: error: include of non-modular header inside framework module 'RSDayFlow.RSDayFlow'
    - ERROR | xcodebuild:  RSDayFlow/RSDayFlow/RSDayFlow.h:36:9: error: include of non-modular header inside framework module 'RSDayFlow.RSDayFlow'
    - ERROR | xcodebuild:  RSDayFlow/RSDayFlow/RSDayFlow.h:37:9: error: include of non-modular header inside framework module 'RSDayFlow.RSDayFlow'
    - ERROR | xcodebuild:  RSDayFlow/RSDayFlow/RSDayFlow.h:38:9: error: include of non-modular header inside framework module 'RSDayFlow.RSDayFlow'
    - ERROR | xcodebuild:  RSDayFlow/RSDayFlow/RSDayFlow.h:39:9: error: include of non-modular header inside framework module 'RSDayFlow.RSDayFlow'
    - ERROR | xcodebuild:  RSDayFlow/RSDayFlow/RSDayFlow.h:40:9: error: include of non-modular header inside framework module 'RSDayFlow.RSDayFlow'
make some headers private, that cause non-modular header include erro…
…r when imported in another Swift framework

@ruslanskorb ruslanskorb referenced this pull request May 10, 2016

Merged

Version 1.5.0 #106

@banjun banjun deleted the banjun:fix-non-modular-header-include branch May 11, 2016

@banjun

This comment has been minimized.

Copy link
Author

commented May 11, 2016

With CocoaPods 1.0.0, the build passes without errors.
CocoaPods 1.0.0 seems to be compatible with #import <RSDayFlow/*.h> style import that search headers from header search paths (without restricting search paths to in RSDayFlow.framework like #import "*.h").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.