Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Error building after installing via CocoaPods — Include of non-modular header inside framework module 'Mapbox' #3300

Closed

Description

@lucacorti

Hello,

I am not able to use the Cocoapods pckages framework with Xcode 7.2 and Swift. When building the application I get:

Pods/Mapbox-iOS-SDK/Mapbox.framework/Headers/Mapbox.h:16:9: Include of non-modular header inside framework module 'Mapbox'

screen shot 2015-12-15 at 04 24 46
screen shot 2015-12-15 at 04 25 07

Activity

  1. added
    iOS
    on Dec 15, 2015
  2. 1ec5 commented on Dec 15, 2015

    @1ec5
    Contributor

    Pretty sure this is CocoaPods/CocoaPods#4420, which is fixed in CocoaPods master. It’s tripping up because we now include a module map that’s redundant with the one CocoaPods creates for us.

    /cc @incanus

  3. lucacorti commented on Dec 15, 2015

    @lucacorti
    Author

    Is there any workaround to make it work right now? The Pod is unusable in its current state and the Cocoapods fix is not released yet.

  4. lucacorti commented on Dec 16, 2015

    @lucacorti
    Author

    I tried importing the header in the the Objective-C bridging header. Stile gettoni the dame error though.

    Il giorno 16 dic 2015, alle ore 05:41, Roman Simenok [email protected] ha scritto:

    I also have issue with mapbox imports, fix it by #import <Mapbox/Mapbox.h>

    —
    Reply to this email directly or view it on GitHub.

  5. 1ec5 commented on Dec 21, 2015

    @1ec5
    Contributor

    I haven’t tried it out yet, but as several commenters in CocoaPods/CocoaPods#4420 point out, you should be able to use something like this to “fix” the Mapbox iOS SDK headers for now:

    post_install do |installer|
        `find Pods -regex 'Pods/Mapbox-iOS-SDK/.*\\.h' -print0 | xargs -0 sed -i '' 's/\\(<\\)Mapbox\\/\\(.*\\)\\(>\\)/\\"\\2\\"/'`
    end

    /cc @friedbunny

  6. friedbunny commented on Dec 21, 2015

    @friedbunny
    Contributor

    That post_install bit does appear to work, got around the Include of non-modular header inside framework module 'Mapbox' build error.

  7. 1ec5 commented on Jan 23, 2016

    @1ec5
    Contributor

    Fixed in #3183. If you still run into this error, make sure your bridging header isn’t importing an individual header but rather the umbrella header (Mapbox/Mapbox.h) or module (Mapbox).

  8. 1ec5 commented on Jan 23, 2016

    @1ec5
    Contributor

    Actually, I still get this error in at least one CocoaPods project written in Swift after upgrading to 3.1.0-pre.1 (which is out now, by the way!). The workaround is to add #import <Mapbox/Mapbox.h> to a bridging header. You may need to clear your module cache before rebuilding.

  9. reopened this on Jan 23, 2016
  10. changed the title [-][iOS][3.0.1] Cocoapods framework not useable[/-] [+]Error building after installing via CocoaPods — Include of non-modular header inside framework module 'Mapbox'[/+] on Jan 23, 2016
  11. added a commit that references this issue on Jan 24, 2016
    bdc8e3d
  12. self-assigned this
    on Jan 24, 2016
  13. 1ec5 commented on Jan 27, 2016

    @1ec5
    Contributor

    v3.1.0-pre.2 (podspec) is out with the fix for this issue. Please let us know if you still see the errors. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

buildiOS

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions