Skip to content
This repository has been 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
lucacorti opened this issue Dec 15, 2015 · 8 comments
Assignees
Labels
build iOS Mapbox Maps SDK for iOS

Comments

@lucacorti
Copy link

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

@1ec5 1ec5 added iOS Mapbox Maps SDK for iOS build labels Dec 15, 2015
@1ec5
Copy link
Contributor

1ec5 commented Dec 15, 2015

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

@lucacorti
Copy link
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.

@lucacorti
Copy link
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 notifications@github.com 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.

@1ec5
Copy link
Contributor

1ec5 commented Dec 21, 2015

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

@friedbunny
Copy link
Contributor

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

@1ec5
Copy link
Contributor

1ec5 commented Jan 23, 2016

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).

@1ec5 1ec5 closed this as completed Jan 23, 2016
@1ec5
Copy link
Contributor

1ec5 commented Jan 23, 2016

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.

@1ec5 1ec5 reopened this Jan 23, 2016
@1ec5 1ec5 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' Jan 23, 2016
1ec5 added a commit that referenced this issue Jan 24, 2016
@1ec5 1ec5 self-assigned this Jan 24, 2016
@1ec5 1ec5 removed the in progress label Jan 24, 2016
@1ec5
Copy link
Contributor

1ec5 commented Jan 27, 2016

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

No branches or pull requests

3 participants