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

include of non-modular header inside framework module error #8668

Closed
1 task done
tripleCC opened this issue Apr 3, 2019 · 6 comments
Closed
1 task done

include of non-modular header inside framework module error #8668

tripleCC opened this issue Apr 3, 2019 · 6 comments
Labels
s1:awaiting input Waiting for input from the original author

Comments

@tripleCC
Copy link
Contributor

tripleCC commented Apr 3, 2019

Report

What did you do?

run git clone https://github.com/for-example-test/module_header_example.git
run cd Example
run pod install
build the project

What did you expect to happen?

build success

What happened instead?

build failed with error include of non-modular header inside framework module

CocoaPods Environment

Stack

   CocoaPods : 1.6.1
        Ruby : ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
    RubyGems : 2.6.14
        Host : Mac OS X 10.14 (18A391)
       Xcode : 10.1 (10B61)
         Git : git version 2.17.2 (Apple Git-113)
Ruby lib dir : /Users/triplecc/.rvm/rubies/ruby-2.4.1/lib
Repositories : 2dfire-cocoapods-spec - git@git.2dfire.net:ios/cocoapods-spec.git @ 40b0d760d6bb710bee013d2f364269365f18c982
               2dfire-cocoapods-spec-1 - git@git.2dfire.net:qingmu/cocoapods-spec.git @ ea3df7212e5a6e40caaf2fb4aafe46c9f9ea24d2
               2dfire-cocoapods-spec-binary - git@git.2dfire.net:ios/cocoapods-spec-binary.git @ db9f1543806aeed0c783d478b642dc3a452b84ff
               2dfire-ios-cocoapods-spec - http://git.2dfire.net/ios/cocoapods-spec.git @ 40b0d760d6bb710bee013d2f364269365f18c982
               2dfire-qingmu-cocoapods-spec - http://git.2dfire.net/qingmu/cocoapods-spec.git @ ea3df7212e5a6e40caaf2fb4aafe46c9f9ea24d2
               for-example-test - https://github.com/for-example-test/PrivateSpecRepo.git @ cbeae90311a95a749bc02c4fc4cf53e28fc686c2
               master - https://github.com/CocoaPods/Specs.git @ cce2f1999b17003c67a5d4f4926e43fef2a0c0fd

Installation Source

Executable Path: /Users/triplecc/.rvm/gems/ruby-2.4.1/bin/pod

Plugins

claide-plugins         : 0.9.2
cocoapods-deintegrate  : 1.0.4
cocoapods-open         : 0.0.8
cocoapods-packager-pro : 1.5.4
cocoapods-plugins      : 1.0.0
cocoapods-search       : 1.0.0
cocoapods-stats        : 1.1.0
cocoapods-trunk        : 1.3.1
cocoapods-try          : 1.1.0

Project that demonstrates the issue

example: https://github.com/for-example-test/module_header_example

module_header_framework_b pod only has a vendor framework

module_header_source_a pod has some source files

module_header_framework_b dependents on module_header_source_a

When I change #import <module_header_source_a/module_header_source_a.h> to #import <module_header_source_a/module_header_source_a-umbrella.h> in module_header_framework_b.h, I can build the project successfully.

It seems that compiler don't map #import<> to @import In the scenario, and I am allowed only to access file exported in modulemap :

module module_header_source_a {
  umbrella header "module_header_source_a-umbrella.h"

  export *
  module * { export * }
}

How do I fix it ?

@0x5e
Copy link

0x5e commented Apr 22, 2019

similar issue, since cocoapods 1.6.x

@0x5e
Copy link

0x5e commented Apr 22, 2019

#import <xxx/xxx-umbrella.h> not work for me, @import xxx; seems work (not fully tested)

@tripleCC
Copy link
Contributor Author

tripleCC commented Apr 22, 2019

@0x5e using @import xxx can avoid the error if you set use_module_headers! in Podfile. but for my project , use_module_headers! will cause lots of header file include error, and I don't have enough time to adapt it ...

@0x5e
Copy link

0x5e commented Apr 23, 2019

@tripleCC we don't set use_module_headers!, maybe xcode cache problem, or maybe project structure you and me are very different.
Seems TwitterKit works fine, it imports TwitterCore in framework. https://github.com/CocoaPods/Specs/blob/master/Specs/b/a/9/TwitterKit/3.4.2/TwitterKit.podspec.json
I'm trying to unset 'source_files' in podspec and only set vendored_frameworks, then #import "xxx.h" can't be used anymore..

@stale
Copy link

stale bot commented Jul 23, 2019

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

@stale stale bot added the s1:awaiting input Waiting for input from the original author label Jul 23, 2019
@stale
Copy link

stale bot commented Jul 30, 2019

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s1:awaiting input Waiting for input from the original author
Projects
None yet
Development

No branches or pull requests

2 participants