#StackBounty: #ios #flutter #flutter-dependencies #podfile Flutter iOS cannot build due to modular header settings in podfile

Bounty: 50

I have a flutter app that was working fine. I’m going through updating my flutter version and the versions of some of my plugins (on the newest XCode version 11). I can no longer build my app because either one of two things occurs:

1) If I don’t have “use_modular_headers!” in my podfile, I get this error when trying to run pod install:

The Swift pod `DKPhotoGallery` depends upon `SDWebImage`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.

2) If I add “use_modular_headers!” to the podfile, then I can successfully install the podfiles, but it fail when building with this error:

fatal error: module map file '/Users/mbpro/Documents/Perkl/ios/Pods/Headers/Private/openssl_grpc/BoringSSL-GRPC.modulemap' not found

The second error I’ve come to find out is because GRPC doesn’t support modular headings. This is where I’m stuck, because due to flutter’s way of dynamically generating podfile from the pubspec, it seems modular headers are either globally on or off, and I can’t specifically turn on modular headers for specific pods.

Here is a list of my pubspec dependencies:

  cloud_firestore: 0.13.6
  firebase_auth: 0.16.1
  firebase_core:
  firebase_database:
  firebase_storage:
  firebase_messaging:
  google_sign_in:
  image_picker:
  image_cropper:
  intl:
  flutter_sound:
  flutter_launcher_icons:
  flushbar:
  file_picker:
  path_provider:
  #audioplayers:
  provider:
  sliding_up_panel:
  font_awesome_flutter:
  marquee:

Any help on this is going to greatly appreciated!! It’s completely shut down my development since I can’t build to test anything after upgrading.

Edit: Flutter Doctor -v output (everything looks fine)

[✓] Flutter (Channel stable, v1.17.3, on Mac OS X 10.15.5 19F101, locale en-US)
    • Flutter version 1.17.3 at /Users/mbpro/Downloads/flutter
    • Framework revision b041144f83 (8 days ago), 2020-06-04 09:26:11 -0700
    • Engine revision ee76268252
    • Dart version 2.8.4


[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/mbpro/Library/Android/sdk
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.5, Build version 11E608c
    • CocoaPods version 1.9.3

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 44.0.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build
      1.8.0_202-release-1483-b49-5587405)

[✓] Connected device (1 available)
    • iPhone SE (2nd generation) • 9FC22937-91AB-4F22-BB1E-20FFB1CAF4C8 • ios •
      com.apple.CoreSimulator.SimRuntime.iOS-13-5 (simulator)

• No issues found!


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.