-
Notifications
You must be signed in to change notification settings - Fork 50
Closed
Description
I'm using FlutterFire version 1.0.0 on macOS 14.0 with cocoapods 1.15.2 and when I include this using:
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.24.0'
Running pod install etc. works, but when running flutter run, this error appears:
Could not build the precompiled application for the device.
Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module
'FirebaseCoreExtension.FIRAppInternal':
'/Users/.../proj_name/ios/Pods/Headers/Public/FirebaseCore/FIRApp.h'
/Users/.../proj_name/ios/Pods/FirebaseCoreExtension/FirebaseCore/Extension/FIRAppInternal.h:16:8
Parse Issue (Xcode): Could not build module 'FirebaseCoreExtension'
/Users/.../proj_name/ios/Pods/FirebaseSessions/FirebaseSessions/SourcesObjC/NanoPB/FIRSESNanoPBHelpers.m:23:8
Uncategorized (Xcode): Command SwiftCompile failed with a nonzero exit code
I've done pod deintegrate && pod update && pod install to make sure my specs are up to date.
My Podfile looks like this:
platform :ios, '12.0'
# 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
# use_modular_headers!
# https://stackoverflow.com/a/72989920
# pod 'Firebase', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
pod 'FirebaseCoreExtension', :modular_headers => true
# pod 'FirebaseFirestore', :modular_headers => true
# pod 'FirebaseFirestoreInternal', :modular_headers => true
# $RNFirebaseAsStaticFramework = true
target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.24.0'
Without the last line, everything works fine and I can build the app.
When I add it, it throws some errors which I fixed by adding these three lines:
pod 'GoogleUtilities', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
pod 'FirebaseCoreExtension', :modular_headers => true
But the non-modular include error stays. How can I fix this?
Metadata
Metadata
Assignees
Labels
No labels