xCode 7 error: include of non-modular header inside framework module with Google Maps

前端 未结 5 1395
遇见更好的自我
遇见更好的自我 2021-01-04 04:11

I updated to xCode 7.1 today and tried to build my app but I\'m getting this error:

I have already tried going to Build Settings under \"Target\" and set \"

相关标签:
5条回答
  • 2021-01-04 04:45

    Google has updated its SDK to 1.10.5, Just Reinstall Pod and it should work fine. I was facing same issue and now all issues are fixed after pod reinstallation.

    0 讨论(0)
  • 2021-01-04 04:52

    I ended up having to create an Objective-C bridging header file and adding #import <GoogleMaps/GoogleMaps.h> whereas I hadn't needed one previously since I was using Cocoapods in a Swift project and the use_frameworks! setting had previously taken care of this.

    Here's instructions for how to create the Objective-C bridging header file: (https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html)

    0 讨论(0)
  • 2021-01-04 05:00

    For me, this issue was resolved by:

    1. Product > Clean (cmd k)
    2. Product > Clean Build Folder (cmd opt k)
    3. Product > Run (cmd r)
    0 讨论(0)
  • 2021-01-04 05:02

    https://forums.developer.apple.com/thread/23554

    Just remove the header search paths in build settings. In new Xcode versions (after 7.0 I guess) you need to look for the headers by linking frameworks and not by linking header files directly.

    0 讨论(0)
  • 2021-01-04 05:06

    This thread may be useful.

    I tried a few things, but I'm not positive which one fixed the issues. First, I edited my Podfile to include:

    post_install do |installer|
        installer.pods_project.build_configuration_list.build_configurations.each do |configuration|
            configuration.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
        end
    end

    Then, I added a bridging header file, with one line:

    #import <GoogleMaps/GoogleMaps.h>
    

    Cleaned and rebuilt the project and that did the trick.

    0 讨论(0)
提交回复
热议问题