Error
it shows this error message when running flutter on IOS 14
Swift Compiler Error (Xcode): Include of non-modular header inside framework module 'FirebaseSessions.FIRSESNanoPBHelpers':
'/Users/azzura/Documents/Projects/Self-Learn/flutter-dev/flutter_financial/ios/Pods/Headers/Public/nanopb/pb.h'
/Users/azzura/Documents/Projects/Self-Learn/flutter-dev/flutter_financial/ios/Pods/FirebaseSessions/FirebaseSessions/SourcesObjC/NanoPB/FIRSE
SNanoPBHelpers.h:28:8
[ +4 ms] Swift Compiler Error (Xcode): Include of non-modular header inside framework module 'FirebaseSessions.FIRSESNanoPBHelpers':
'/Users/azzura/Documents/Projects/Self-Learn/flutter-dev/flutter_financial/ios/Pods/Headers/Public/nanopb/pb_decode.h'
/Users/azzura/Documents/Projects/Self-Learn/flutter-dev/flutter_financial/ios/Pods/FirebaseSessions/FirebaseSessions/SourcesObjC/NanoPB/FIRSE
SNanoPBHelpers.h:29:8
[ ] Swift Compiler Error (Xcode): Include of non-modular header inside framework module 'FirebaseSessions.FIRSESNanoPBHelpers':
'/Users/azzura/Documents/Projects/Self-Learn/flutter-dev/flutter_financial/ios/Pods/Headers/Public/nanopb/pb_encode.h'
/Users/azzura/Documents/Projects/Self-Learn/flutter-dev/flutter_financial/ios/Pods/FirebaseSessions/FirebaseSessions/SourcesObjC/NanoPB/FIRSE
SNanoPBHelpers.h:30:8
[ ] Swift Compiler Error (Xcode): Include of non-modular header inside framework module 'FirebaseSessions.sessions_nanopb':
'/Users/azzura/Documents/Projects/Self-Learn/flutter-dev/flutter_financial/ios/Pods/Headers/Public/nanopb/pb.h'
/Users/azzura/Documents/Projects/Self-Learn/flutter-dev/flutter_financial/ios/Pods/FirebaseSessions/FirebaseSessions/SourcesObjC/Protogen/nan
opb/sessions.nanopb.h:21:9
[ ] Swift Compiler Error (Xcode): Could not build Objective-C module 'FirebaseSessions'
[ +3 ms] Could not build the application for the simulator.
[ +1 ms] Error launching application on iPhone 14 Pro Max.
Podfile
here's my podfile should i change how i put pod 'Firebase'?
# Uncomment this line to define a global platform for your project
platform :ios, '11.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
pod 'Firebase', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
$RNFirebaseAsStaticFramework = true
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
use_frameworks!
use_modular_headers!
pod 'BoringSSL-GRPC'
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |build_configuration|
build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64 i386'
end
end
end
i tried Deleting pubspec.lock, Pods folder in ios and Podfile.lock then running flutter clean -> flutter pub get -> cd ios -> pod install -> cd .. -> flutter run, but it still won't work