flutterfire
flutterfire copied to clipboard
cloud_firestore: unsupported option '-G' for target 'x86_64-apple-ios10.0-simulator'
Is there an existing issue for this?
- [X] I have searched the existing issues.
Which plugins are affected?
Database, Other
Which platforms are affected?
iOS
Description
Using the Xcode 16 beta, I ran into this issue trying to build my projects. It only happens when I include the cloud_firestore plugin.
unsupported option '-G' for target 'x86_64-apple-ios10.0-simulator'
Reproducing the issue
Use Xcode 16 beta on macOS Sequoia beta. Create a new flutter project, add cloud_firestore as a dependency.
Firebase Core version
3.1.0
Flutter Version
3.23.0-13.0.pre.239
Relevant Log Output
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 3.23.0-13.0.pre.239, on macOS 15.0 24A5264n
darwin-arm64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.90.0)
[✓] Connected device (5 available)
[✓] Network resources
• No issues found!
------
flutter run
Launching lib/main.dart on iPhone 15 Pro Max in debug mode...
Running pod install... 17.4s
Running Xcode build...
Xcode build done. 21.7s
Failed to build iOS app
Error (Xcode): unsupported option '-G' for target
'x86_64-apple-ios10.0-simulator'
Could not build the application for the simulator.
Error launching application on iPhone 15 Pro Max.
Flutter dependencies
Expand Flutter dependencies snippet
Dart SDK 3.5.0-254.0.dev
Flutter SDK 3.23.0-13.0.pre.239
foo 0.1.0
dependencies:
- cloud_firestore 5.0.1 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 3.1.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
dev dependencies:
- flutter_lints 4.0.0 [lints]
- flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math leak_tracker_flutter_testing async boolean_selector characters collection leak_tracker leak_tracker_testing material_color_utilities meta source_span stream_channel string_scanner term_glyph vm_service]
transitive dependencies:
- _flutterfire_internals 1.3.37 [collection firebase_core firebase_core_platform_interface flutter meta]
- async 2.11.0 [collection meta]
- boolean_selector 2.1.1 [source_span string_scanner]
- characters 1.3.0
- clock 1.1.1
- cloud_firestore_platform_interface 6.2.7 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 4.0.1 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins]
- collection 1.18.0
- fake_async 1.3.1 [clock collection]
- firebase_core_platform_interface 5.1.0 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 2.17.2 [firebase_core_platform_interface flutter flutter_web_plugins meta web]
- flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math]
- leak_tracker 10.0.5 [clock collection meta path vm_service]
- leak_tracker_flutter_testing 3.0.5 [flutter leak_tracker leak_tracker_testing matcher meta]
- leak_tracker_testing 3.0.1 [leak_tracker matcher meta]
- lints 4.0.0
- matcher 0.12.16+1 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.11.1 [collection]
- meta 1.15.0
- path 1.9.0
- plugin_platform_interface 2.1.8 [meta]
- sky_engine 0.0.99
- source_span 1.10.0 [collection path term_glyph]
- stack_trace 1.11.1 [path]
- stream_channel 2.1.2 [async]
- string_scanner 1.2.0 [source_span]
- term_glyph 1.2.1
- test_api 0.7.2 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph]
- vector_math 2.1.4
- vm_service 14.2.4
- web 0.5.1
Additional context and comments
No response
It is likely caused by this problem: https://github.com/firebase/firebase-ios-sdk/issues/13115
Any work arounds ?
My solution for this problem, works fine with debug and release for me :)
https://stackoverflow.com/a/78651666/25662983
My solution for this problem, works fine with debug and release for me :)
https://stackoverflow.com/a/78651666/25662983
This helped me, especially this part: (In Xcode) On the row select Build Settings and search for and set it to yes ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
My solution for this problem, works fine with debug and release for me :) https://stackoverflow.com/a/78651666/25662983
This helped me, especially this part: (In Xcode) On the row select Build Settings and search for and set it to yes ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
I didn't find ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES in Build settings
@abom-me
I did all these things, but it's showing me a new error now
Click here to expand/collapse the error
Launching lib/main.dart on iPhone 16 Plus in debug mode...
Xcode build done. 855.0s
dart(25084) MallocStackLogging: can't turn off malloc stack logging because it was not enabled.
Failed to build iOS app
Error (Xcode): Undefined symbol: absl::lts_20240116::CHexEscape(absl::lts_20240116::string_view)
Error (Xcode): Undefined symbol: absl::lts_20240116::FormatTime(absl::lts_20240116::string_view, absl::lts_20240116::Time, absl::lts_20240116::TimeZone)
Error (Xcode): Undefined symbol: absl::lts_20240116::SimpleAtof(absl::lts_20240116::string_view, float*)
Error (Xcode): Undefined symbol: absl::lts_20240116::Base64Escape(absl::lts_20240116::string_view)
Error (Xcode): Undefined symbol: absl::lts_20240116::UnknownError(absl::lts_20240116::string_view)
Error (Xcode): Undefined symbol: absl::lts_20240116::InternalError(absl::lts_20240116::string_view)
Error (Xcode): Undefined symbol: absl::lts_20240116::NotFoundError(absl::lts_20240116::string_view)
Error (Xcode): Undefined symbol: absl::lts_20240116::StrReplaceAll(absl::lts_20240116::string_view, std::initializer_list<std::__1::pair<absl::lts_20240116::string_view, absl::lts_20240116::string_view>>)
Error (Xcode): Undefined symbol: absl::lts_20240116::Base64Unescape(absl::lts_20240116::string_view, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)
Error (Xcode): Undefined symbol: absl::lts_20240116::CancelledError(absl::lts_20240116::string_view)
Error (Xcode): Undefined symbol: absl::lts_20240116::flags_internal::AbslParseFlag(absl::lts_20240116::string_view, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)
Error (Xcode): Undefined symbol: absl::lts_20240116::flags_internal::AbslParseFlag(absl::lts_20240116::string_view, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)
Error (Xcode): Undefined symbol: absl::lts_20240116::flags_internal::AbslParseFlag(absl::lts_20240116::string_view, bool*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)
Error (Xcode): Undefined symbol: absl::lts_20240116::flags_internal::AbslParseFlag(absl::lts_20240116::string_view, int*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)
Error (Xcode): Undefined symbol: absl::lts_20240116::flags_internal::AbslUnparseFlag(absl::lts_20240116::string_view)
Error (Xcode): Undefined symbol: absl::lts_20240116::status_internal::StatusRep::SetPayload(absl::lts_20240116::string_view, absl::lts_20240116::Cord)
Error (Xcode): Undefined symbol: absl::lts_20240116::BytesToHexString(absl::lts_20240116::string_view)
Error (Xcode): Undefined symbol: absl::lts_20240116::EqualsIgnoreCase(absl::lts_20240116::string_view, absl::lts_20240116::string_view)
Error (Xcode): Undefined symbol: absl::lts_20240116::UnavailableError(absl::lts_20240116::string_view)
Error (Xcode): Undefined symbol: absl::lts_20240116::numbers_internal::safe_strto32_base(absl::lts_20240116::string_view, int*, int)
Error (Xcode): Undefined symbol: absl::lts_20240116::numbers_internal::safe_strto64_base(absl::lts_20240116::string_view, long long*, int)
Error (Xcode): Undefined symbol: absl::lts_20240116::numbers_internal::safe_strtou32_base(absl::lts_20240116::string_view, unsigned int*, int)
Error (Xcode): Undefined symbol: absl::lts_20240116::numbers_internal::safe_strtou64_base(absl::lts_20240116::string_view, unsigned long long*, int)
Error (Xcode): Undefined symbol: absl::lts_20240116::strings_internal::AppendPieces(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*, std::initializer_list<absl::lts_20240116::string_view>)
Error (Xcode): Undefined symbol: absl::lts_20240116::strings_internal::StringifySink::Append(absl::lts_20240116::string_view)
Error (Xcode): Undefined symbol: absl::lts_20240116::strings_internal::CatPieces(std::initializer_list<absl::lts_20240116::string_view>)
Error (Xcode): Undefined symbol: absl::lts_20240116::variant_internal::ThrowBadVariantAccess()
Error (Xcode): Undefined symbol: absl::lts_20240116::optional_internal::throw_bad_optional_access()
Error (Xcode): Undefined symbol: absl::lts_20240116::EndsWithIgnoreCase(absl::lts_20240116::string_view, absl::lts_20240116::string_view)
Error (Xcode): Undefined symbol: absl::lts_20240116::UnimplementedError(absl::lts_20240116::string_view)
Error (Xcode): Undefined symbol: bool absl::lts_20240116::str_format_internal::FormatArgImpl::Dispatch<absl::lts_20240116::string_view>(absl::lts_20240116::str_format_internal::FormatArgImpl::Data, absl::lts_20240116::str_format_internal::FormatConversionSpecImpl, void*)
Error (Xcode): Undefined symbol: absl::lts_20240116::InvalidArgumentError(absl::lts_20240116::string_view)
Error (Xcode): Undefined symbol: absl::lts_20240116::StartsWithIgnoreCase(absl::lts_20240116::string_view, absl::lts_20240116::string_view)
Error (Xcode): Undefined symbol: absl::lts_20240116::UnauthenticatedError(absl::lts_20240116::string_view)
Error (Xcode): Undefined symbol: absl::lts_20240116::DeadlineExceededError(absl::lts_20240116::string_view)
Error (Xcode): Undefined symbol: absl::lts_20240116::PermissionDeniedError(absl::lts_20240116::string_view)
Error (Xcode): Undefined symbol: absl::lts_20240116::ResourceExhaustedError(absl::lts_20240116::string_view)
Error (Xcode): Undefined symbol: absl::lts_20240116::FailedPreconditionError(absl::lts_20240116::string_view)
Error (Xcode): Undefined symbol: absl::lts_20240116::Cord::GetFlatAux(absl::lts_20240116::cord_internal::CordRep*, absl::lts_20240116::string_view*)
Error (Xcode): Undefined symbol: absl::lts_20240116::Cord::InlineRep::AppendArray(absl::lts_20240116::string_view, absl::lts_20240116::cord_internal::CordzUpdateTracker::MethodIdentifier)
Error (Xcode): Undefined symbol: absl::lts_20240116::Cord::Cord(absl::lts_20240116::string_view, absl::lts_20240116::cord_internal::CordzUpdateTracker::MethodIdentifier)
Error (Xcode): Undefined symbol: absl::lts_20240116::Status::Status(absl::lts_20240116::StatusCode, absl::lts_20240116::string_view)
Error (Xcode): Undefined symbol: absl::lts_20240116::CEscape(absl::lts_20240116::string_view)
Error (Xcode): Undefined symbol: absl::lts_20240116::ByString::ByString(absl::lts_20240116::string_view)
Error (Xcode): Undefined symbol: absl::lts_20240116::CUnescape(absl::lts_20240116::string_view, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)
Error (Xcode): Undefined symbol: absl::lts_20240116::ParseTime(absl::lts_20240116::string_view, absl::lts_20240116::string_view, absl::lts_20240116::Time*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*)
Error (Xcode): Undefined symbol: absl::lts_20240116::string_view::find_first_of(absl::lts_20240116::string_view, unsigned long) const
Error (Xcode): Undefined symbol: absl::lts_20240116::string_view::find(absl::lts_20240116::string_view, unsigned long) const
Error (Xcode): Undefined symbol: absl::lts_20240116::string_view::find(char, unsigned long) const
Error (Xcode): Undefined symbol: absl::lts_20240116::string_view::rfind(char, unsigned long) const
Error (Xcode): Undefined symbol: absl::lts_20240116::status_internal::StatusRep::GetPayload(absl::lts_20240116::string_view) const
Error (Xcode): Undefined symbol: absl::lts_20240116::status_internal::StatusRep::ForEachPayload(absl::lts_20240116::FunctionRef<void (absl::lts_20240116::string_view, absl::lts_20240116::Cord const&)>) const
Error (Xcode): Undefined symbol: absl::lts_20240116::ByChar::Find(absl::lts_20240116::string_view, unsigned long) const
Error (Xcode): Undefined symbol: absl::lts_20240116::ByString::Find(absl::lts_20240116::string_view, unsigned long) const
Could not build the application for the simulator.
Error launching application on iPhone 16 Plus.
Exited (1).
My `Podfile`
# Uncomment this line to define a global platform for your project
platform :ios, '18.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
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
post_install do |installer|
installer.pods_project.targets.each do |target|
# Handle BoringSSL-GRPC issues
if target.name == 'BoringSSL-GRPC'
target.source_build_phase.files.each do |file|
if file.settings && file.settings['COMPILER_FLAGS']
flags = file.settings['COMPILER_FLAGS'].split
flags.reject! { |flag| flag == '-GCC_WARN_INHIBIT_ALL_WARNINGS' }
file.settings['COMPILER_FLAGS'] = flags.join(' ')
end
end
end
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '18.0'
end
end
end
Met the same issue. Any fixes?
Having the same issue, any updates?
For me, changing the 'Allow Non-Modular Inludes in Framework Modules' to yes was not enough. I found the solution in this video below.
https://youtu.be/vZdo55YSC5A?si=BtCjSbHQGT3Ja0Ip
1) Open podfile 2) change post install to:
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'BoringSSL-GRPC'
target.source_build_phase.files.each do |file|
if file.settings && file.settings['COMPILER_FLAGS']
flags = file.settings['COMPILER_FLAGS'].split
flags.reject! { |flag| flag == '-GCC_WARN_INHIBIT_ALL_WARNINGS' }
file.settings['COMPILER_FLAGS'] = flags.join(' ')
end
end
end
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
end
end
end
3) open Xcode > select target > build settings > change 'Allow Non-Modular Inludes in Framework Modules' to YES.
i hope this helps @root-daemon @yanshengjia
@sgamzeo I tried, that it worked, however I am stuck with a different error now, the firebaseApp being not initialized.
for somereason the flutter project took nearly 30 minutes to build, so I ended using Xcode to build it.
@curtiscovington - Are you using the firestore-ios-sdk-frameworks in your Podfile by any chance?
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => "11.4.0"
Also - if anyone else is experiencing this issue with the above in your Podfile, let me know 🙏
@curtiscovington - Are you using the
firestore-ios-sdk-frameworksin your Podfile by any chance?pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => "11.4.0"Also - if anyone else is experiencing this issue with the above in your Podfile, let me know 🙏
I got an error when using cloud_firestore.
my command
ios git:(main) ✗ pod install
Analyzing dependencies
cloud_firestore: Using Firebase SDK version '10.25.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '10.25.0' defined in 'firebase_core'
my Podfile
# Uncomment this line to define a global platform for your project
platform :ios, '13.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
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|
if target.name == 'BoringSSL-GRPC'
target.source_build_phase.files.each do |file|
if file.settings && file.settings['COMPILER_FLAGS']
flags = file.settings['COMPILER_FLAGS'].split
flags.reject! { |flag| flag == '-GCC_WARN_INHIBIT_ALL_WARNINGS' }
file.settings['COMPILER_FLAGS'] = flags.join(' ')
end
end
end
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
end
end
end
@doyeonjeong - did you include this in your Podfile to help with build times?
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => "11.4.0"
This ought to fix this problem.
Hey @curtiscovington. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@curtiscovington if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.