Flutterfire: Flutter Add-To-App: could not build module 'GoogleDataTransport'

Created on 22 Jan 2020  Â·  7Comments  Â·  Source: FirebaseExtended/flutterfire

Hey there,
since last week we are unable to build our iOS Project that includes Flutter via add-to-app. These are the errors I get when executing flutter build ios:

:1:1: error: umbrella header for module 'GoogleDataTransport' does not include header 'GDTCORReachability.h' [-Werror,-Wincomplete-umbrella]
:1:1: error: umbrella header for module 'GoogleDataTransport' does not include header 'GDTCORReachability_Private.h' [-Werror,-Wincomplete-umbrella]
:1:1: error: umbrella header for module 'GoogleDataTransport' does not include header 'GDTCORRegistrar_Private.h' [-Werror,-Wincomplete-umbrella]
:1:1: error: umbrella header for module 'GoogleDataTransport' does not include header 'GDTCORStorage.h' [-Werror,-Wincomplete-umbrella]
:1:1: error: umbrella header for module 'GoogleDataTransport' does not include header 'GDTCORStorage_Private.h' [-Werror,-Wincomplete-umbrella]
:1:1: error: umbrella header for module 'GoogleDataTransport' does not include header 'GDTCORTransformer.h' [-Werror,-Wincomplete-umbrella]
:1:1: error: umbrella header for module 'GoogleDataTransport' does not include header 'GDTCORTransformer_Private.h' [-Werror,-Wincomplete-umbrella]
:1:1: error: umbrella header for module 'GoogleDataTransport' does not include header 'GDTCORTransport_Private.h' [-Werror,-Wincomplete-umbrella]
:1:1: error: umbrella header for module 'GoogleDataTransport' does not include header 'GDTCORUploadCoordinator.h' [-Werror,-Wincomplete-umbrella]
:1:1: error: umbrella header for module 'GoogleDataTransport' does not include header 'GDTCORUploadPackage_Private.h' [-Werror,-Wincomplete-umbrella]
11 errors generated.
In file included from
/GoogleDataTransportCCTSupport/GoogleDataTransportCCTSupport/GDTCCTLibrary/GDTCCTNanopbHelpers.m:17:
/GoogleDataTransportCCTSupport/GoogleDataTransportCCTSupport/GDTCCTLibrary/Private/GDTCCTNanopbHelpers.h:19:9: fatal
error: could not build module 'GoogleDataTransport'
#import

I also have seen the two issues that I think are related to this one:
https://github.com/flutter/flutter/issues/41383
https://github.com/flutter/flutter/issues/47627

I already tried everything recommended there but unfortunately nothing helps…

Here is my flutter doctor:

output:Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.15.2 19C57, locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 11.3)
[!] Android Studio (version 3.4)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[!] IntelliJ IDEA Community Edition (version 2019.1.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.41.1)
[!] Connected device
! No devices available

Her is our pubspec.yaml

name: simpleclub_flutter
description: A new flutter module project.
version: 1.3.8+flutter

environment:
  sdk: ">=2.6.0 <3.0.0"
  flutter: ">=1.12.13 <2.0.0"

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  bloc: ^0.9.5 
  flutter_bloc: ^0.7.1 
  http: ^0.12.0+4
  firebase_analytics:
    git:
      url: [email protected]:simpleclub/plugins
      path: packages/firebase_analytics
      ref: firebase-analytics/params-on-predefined
  firebase_auth: ^0.15.3
  google_sign_in: any
  cloud_firestore: ^0.13.0+1
  firebase_remote_config: ^0.3.0+1
  firebase_performance: ^0.3.1+5
  firebase_storage: 3.0.6
  firebase_crashlytics: ^0.1.2+4
  in_app_purchase: ^0.3.0
  url_launcher: ^5.4.1
  flutter_svg: ^0.15.0
  flutter_markdown:
    git:
      url: [email protected]:simpleclub/flutter_markdown
      ref: production
  tuple: ^1.0.3
  purchases_flutter: ^1.0.4
  auto_size_text: ^2.1.0
  path_provider: ^1.5.1
  uri: ^0.11.3+1
  flutter_cache_manager: ^1.1.3
  mime_type:
    git:
      url: [email protected]:simpleclub/mime_type
      ref: master
  native_pdf_view: ^2.1.1
  retry: ^3.0.0+1
  deep_pick:
    git:
      url: [email protected]:simpleclub/deep_pick
      ref: default_values
  logging: ^0.11.3+2

dev_dependencies:
  flutter_test:
    sdk: flutter
  lint: ^1.1.1
  mockito: ^4.1.1

  module:
    androidX: true
    androidPackage: com.simpleclub.flutter.host
    iosBundleIdentifier: com.simpleclub.flutter.host

And here is the Podfile:

plugin 'cocoapods-acknowledgements'

platform :ios, '9.0'

target 'simpleclub' do
  inhibit_all_warnings!

  pod 'Firebase'
  pod 'Firebase/Core'
  pod 'Firebase/Auth'
  pod 'Firebase/Messaging'
  pod 'Firebase/DynamicLinks'
  pod 'Firebase/RemoteConfig'
  pod 'Firebase/Storage'
  pod 'Firebase/Performance'
  pod 'Firebase/Firestore'
  pod 'Firebase/InAppMessaging'
  pod 'Firebase/InAppMessagingDisplay'
  pod 'Fabric', '~> 1.8'
  pod 'Crashlytics', '~> 3.11'
  pod 'FirebaseUI', '~> 8.4'

  pod 'FBSDKLoginKit'
  pod 'FBSDKCoreKit', :modular_headers => true

  target 'simpleclubTests' do
    inherit! :search_paths
  end

  target 'simpleclubUITests' do
    inherit! :search_paths
  end

end

Can anybody help?

bug

All 7 comments

I have added the pubspec and the podfile to clarify things

This bug prevents us from releasing an app update…

Same here..

add this to your Podfile

pod 'BoringSSL-GRPC', '= 0.0.3', :modular_headers => false
pod 'gRPC-Core', '= 1.21.0', :modular_headers => false

this seems to fixes the issue

Commenting out ios/Podfile solves this issue.

 post_install do |installer|
-  installer.pods_project.targets.each do |target|
-    # Aggregate targets do not have a headers build phase.
-    if target.respond_to?('headers_build_phase')
-      target.headers_build_phase.files.each do |file|
-        # Make headers public so they can be imported by the host application.
-        file.settings = { 'ATTRIBUTES' => ['Public'] }
-      end
-    end
-  end
 end

https://github.com/flutter/flutter/issues/48859#issuecomment-582124212
https://github.com/flutter/flutter/pull/40927

This issue was moved by jmagman to flutter/flutter#50532.

Commenting out ios/Podfile solves this issue.

 post_install do |installer|
-  installer.pods_project.targets.each do |target|
-    # Aggregate targets do not have a headers build phase.
-    if target.respond_to?('headers_build_phase')
-      target.headers_build_phase.files.each do |file|
-        # Make headers public so they can be imported by the host application.
-        file.settings = { 'ATTRIBUTES' => ['Public'] }
-      end
-    end
-  end
 end

flutter/flutter#48859 (comment)
flutter/flutter#40927

works for me with flutter build ios, not build framework

Was this page helpful?
0 / 5 - 0 ratings