Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
844 views
in Technique[技术] by (71.8m points)

firebase - BoringSSL-GRPC.modulemap not found when building flutter to IOS

I'm using this app with firebase now, and when I try to build in xcode, it throws this error:

module map file '/--mypath--/ios/Pods/Headers/Private/openssl_grpc/BoringSSL-GRPC.modulemap' not found

Above is my podfile

# Uncomment this line to define a global platform for your project
platform :ios, '10.0'
use_modular_headers!

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |pi|
  pi.pods_project.targets.each do |t|
    t.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "10.0"
    end  
  end
end

I already tried use_frameworks! and dropping out use_modular_headers! but still showing the error. I'm stuck on it and any help will be welcome

Update I read that it can be a problem of firebase dependencies versions. This is my pubspec. There are any problem with it?

dependencies:
  flutter:
    sdk: flutter
  intl: ^0.16.1
  http: ^0.12.2
  provider: ^4.0.5
  hive: ^1.4.4
  hive_flutter: ^0.3.1
  path_provider: ^1.6.22
  carousel_slider: ^2.3.1    
  dio: ^3.0.10
  permission_handler: ^5.0.1+1
  open_file: ^3.0.3
  flutter_local_notifications: ^3.0.1
  cached_network_image: ^2.3.3
  url_launcher: 5.7.10
  image_picker: ^0.6.7+14
  firebase_storage: ^5.1.0
  firebase_core: ^0.5.2+1
  qr_code_scanner: ^0.0.13
  pdf: ^1.12.0
  printing: ^3.7.1
  cloud_firestore: ^0.14.4
  firebase_messaging: ^7.0.3
  flutter_localizations:
    sdk: flutter

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Use use_frameworks! :linkage => :static instead of use_modular_headers!

More details at https://github.com/firebase/firebase-ios-sdk/issues/3816


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...