-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flutter iOS [FirebaseAuth]: After Upgrading to latest version and flutter version to 3.22.2 Failed to build iOS #13323
Comments
Launching lib/main.dart on iPhone Xs in debug mode... Xcode's output:
Could not build the application for the simulator. Exited (1). |
I'm unable to reproduce this issue. Kindly delete your |
@SelaseKay Yup i have tried all the possible ways, even though i am facing same issue and one more thing to be notified here i am on macos beta as well as xcode 16 beta |
I'm seeing a similar thing after upgrading to xCode 16 and iOS 18 on an iPhone 16. I've tried the following without any luck.
My # 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__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
# Compiles with microphone disabled by default.
#
# This is a workaround when using the just_audio
# plugin without a microphone.
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',
'AUDIO_SESSION_MICROPHONE=0'
]
end
end
end My error output looks like this:
Here is my flutter doctor output:
|
Can you try with a stable version of Xcode? |
i'm having the same issue with XCode 16 Xcode's output:
Could not build the application for the simulator. |
Can you try testing with Xcode versions within the 15.x range? |
Same issue, using just released stable Xcode 16, iOS 18, macOS 15 |
Cant try testing as Xcode 15.x versions are not available for macOS 15 |
Just to add, this is not conserning only auth, also other libs. My pubsec:
Build error:
My flutter version:
|
Hi; You should check out this article. It worked for me |
didn't work flutter/flutter#155295 |
I'm having exactly the same issue today after upgrading to Flutter 3.24.3 and also to XCode 16.0 and iOS 18.0. On my side none of the proposed changes worked, including:
|
+1 for CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES to YES working. |
Same issue for me:
Flutter doctor:
|
… Xcode 16 Without this workaround iOS build currently fails with the following error: Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'firebase_messaging FLTFirebaseMessagingPlugin': '/Users/rajveer/Projects/zulip-flutter/ios/Pods/Headers/Public/Firebase/Firebase.h' /Users/rajveer/.pub-cache/hosted/pub.dev/firebase_messaging-15.0.4/ios/Classes/FLTFirebaseMessagingPlugin.h:11:8 Upstream issue and the workaround comment: firebase/flutterfire#13323 firebase/flutterfire#13323 (comment) Docs: https://developer.apple.com/documentation/xcode/build-settings-reference#Allow-Non-modular-Includes-In-Framework-Modules The documentation states that enabling this setting may result in issues later on, which is why this workaround should only be temporary until firebase_messaging is patched with the correct fix.
… Xcode 16 Without this workaround iOS build currently fails with the following error: Lexical or Preprocessor Issue (Xcode): Include of non-modular header inside framework module 'firebase_messaging FLTFirebaseMessagingPlugin': '/Users/rajveer/Projects/zulip-flutter/ios/Pods/Headers/Public/Firebase/Firebase.h' /Users/rajveer/.pub-cache/hosted/pub.dev/firebase_messaging-15.0.4/ios/Classes/FLTFirebaseMessagingPlugin.h:11:8 Upstream issue and the workaround comment: firebase/flutterfire#13323 firebase/flutterfire#13323 (comment) Docs: https://developer.apple.com/documentation/xcode/build-settings-reference#Allow-Non-modular-Includes-In-Framework-Modules The documentation states that enabling this setting may result in issues later on, which is why this workaround should only be temporary until firebase_messaging is patched with the correct fix.
Hey folks, I have a fix on this branch: https://github.com/firebase/flutterfire/tree/auth-13323 (Or this PR). Could you use this branch to build your app and let me know if it resolves your issue? If so, I can look to get this released at some point today 🙏 |
When can we expect the fix to be released on pub.dev? |
Thanks for the fix @russellwheatley Wondering if this will be bundled with the next 11.2 iOS SDK release: #13338 ? |
@russellwheatley main branch works for me. The branch in the PR is not available anymore, but main contains your fixes so I used that one. Pubspec: diff --git a/pubspec.yaml b/pubspec.yaml
index f99299e..bbe7904 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -36,7 +36,12 @@ dependencies:
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.8
firebase_core: ^3.4.0
- firebase_auth: ^5.2.0
+ # firebase_auth: ^5.2.0
+ firebase_auth:
+ git:
+ url: https://github.com/firebase/flutterfire.git
+ path: packages/firebase_auth/firebase_auth
+ ref: main
google_sign_in: ^6.2.1
cloud_firestore: ^5.3.0
go_router: ^14.2.7 Before:
After:
|
Thanks for the responses and feedback 👍 . We are cutting a release today 🙏 |
Hi, when would this be available on pub.dev? How can I manually choose to fetch deps from the main branch? Sorry for the novel questions... |
@Inakitajes - available on pub.dev today. Check pub.dev for new releases. Can update pubspec.yaml to point to repo if you cannot wait. E.g: firebase_auth:
git:
url: https://github.com/firebase/flutterfire.git
path: packages/firebase_auth/firebase_auth
ref: main |
issues are fixed |
Thank you for your work on this issue. Just a quick follow up question. Does the fix that was released to pub.dev mean that we no longer need to include:
In our Podfile? |
@thermoworker yes, exactly. |
Error output from Xcode build: Xcode's output:
Could not build the application for the simulator. |
Please check your url_launcher_ios version on pubspec.lock file. See: https://pub.dev/packages/url_launcher_ios/changelog#631 |
Is there an existing issue for this?
Which plugins are affected?
Core, Auth
Which platforms are affected?
iOS
Description
I have pasted my logs below facing some deployment target kind of issues even after changing deployment target properly in application
Reproducing the issue
Firebase Core version
^3.4.1
Flutter Version
3.22.2
Relevant Log Output
No response
Flutter dependencies
Expand
Flutter dependencies
snippetAdditional context and comments
No response
The text was updated successfully, but these errors were encountered: