firebase / flutterfire

πŸ”₯ A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.71k stars 3.97k forks source link

[Auth]: Can't build iOS Bundle (Auth.swift:287:2 and more) #13331

Closed olostan closed 1 month ago

olostan commented 1 month ago

Is there an existing issue for this?

Which plugins are affected?

Auth

Which platforms are affected?

iOS

Description

Building iOS bundle

Reproducing the issue

Running flutter build ios

Firebase Core version

3.4.1

Flutter Version

3.25

Relevant Log Output

Building chat.friendy.friendy for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: X3CKTZVT8P
Running pod install...                                             47.4s
Running Xcode build...
Xcode build done.                                           145.7s
Failed to build iOS app
Swift Compiler Error (Xcode): Expected declaration
/Users/olostan/code/friendy/mobile/ios/Pods/FirebaseAuth/FirebaseAuth/Sources/Swift/Auth/Auth.swift:287:2

Swift Compiler Error (Xcode): Expected declaration
/Users/olostan/code/friendy/mobile/ios/Pods/FirebaseAuth/FirebaseAuth/Sources/Swift/AuthProvider/OAuthProvider.swift:42:2

Swift Compiler Error (Xcode): Expected declaration
/Users/olostan/code/friendy/mobile/ios/Pods/FirebaseAuth/FirebaseAuth/Sources/Swift/AuthProvider/OAuthProvider.swift:68:2

Swift Compiler Error (Xcode): Expected declaration
/Users/olostan/code/friendy/mobile/ios/Pods/FirebaseAuth/FirebaseAuth/Sources/Swift/AuthProvider/OAuthProvider.swift:146:2

Swift Compiler Error (Xcode): Expected declaration
/Users/olostan/code/friendy/mobile/ios/Pods/FirebaseAuth/FirebaseAuth/Sources/Swift/AuthProvider/OAuthProvider.swift:183:2

Swift Compiler Error (Xcode): Expected declaration
/Users/olostan/code/friendy/mobile/ios/Pods/FirebaseAuth/FirebaseAuth/Sources/Swift/AuthProvider/OAuthProvider.swift:213:2

Swift Compiler Error (Xcode): Expected declaration
/Users/olostan/code/friendy/mobile/ios/Pods/FirebaseAuth/FirebaseAuth/Sources/Swift/AuthProvider/OAuthProvider.swift:238:2

Swift Compiler Error (Xcode): Expected declaration
/Users/olostan/code/friendy/mobile/ios/Pods/FirebaseAuth/FirebaseAuth/Sources/Swift/User/User.swift:98:2

Swift Compiler Error (Xcode): Expected declaration
/Users/olostan/code/friendy/mobile/ios/Pods/FirebaseAuth/FirebaseAuth/Sources/Swift/User/User.swift:140:2

Encountered error while building for device.

### Flutter dependencies

<!--- Look below for instructions on how to share your Flutter Dependencies. --->

<details>
<summary>Expand <code>Flutter dependencies</code> snippet</summary>
<br>

```yaml

Dart SDK 3.6.0-149.3.beta
Flutter SDK 3.25.0-0.1.pre
friendy 1.0.0+1

dependencies:
- build 2.4.1 [analyzer async convert crypto glob logging meta package_config path]
- cloud_firestore 5.4.1 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta]
- cupertino_icons 1.0.8
- firebase_auth 5.2.1 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 3.4.1 [firebase_core_platform_interface firebase_core_web flutter meta]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- flutter_animate 4.5.0 [flutter flutter_shaders]
- flutter_custom_carousel 0.1.0+1 [flutter flutter_animate]
- flutter_launcher_icons 0.13.1 [args checked_yaml cli_util image json_annotation path yaml]
- google_sign_in 6.2.1 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web]
- infinite_carousel 1.1.1 [flutter]
- overlapped_carousel 1.0.2 [flutter]
- quickalert 1.1.0 [flutter vector_math]
- source_gen 1.5.0 [analyzer async build dart_style glob path source_span yaml]
- stream_transform 2.1.0

dev dependencies:
- build_runner 2.4.12 [analyzer args async build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style frontend_server_client glob graphs http_multi_server io js logging meta mime package_config path pool pub_semver pubspec_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web_socket_channel yaml]
- 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:
- _fe_analyzer_shared 73.0.0 [meta]
- _flutterfire_internals 1.3.42 [collection firebase_core firebase_core_platform_interface flutter meta]
- _macros 0.3.2
- analyzer 6.8.0 [_fe_analyzer_shared collection convert crypto glob macros meta package_config path pub_semver source_span watcher yaml]
- archive 3.6.1 [crypto path]
- args 2.5.0
- async 2.11.0 [collection meta]
- boolean_selector 2.1.1 [source_span string_scanner]
- build_config 1.1.1 [checked_yaml json_annotation path pubspec_parse yaml]
- build_daemon 4.0.2 [built_collection built_value crypto http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel]
- build_resolvers 2.4.2 [analyzer async build collection convert crypto graphs logging package_config path pool pub_semver stream_transform yaml]
- build_runner_core 7.3.2 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta package_config path pool timing watcher yaml]
- built_collection 5.1.1
- built_value 8.9.2 [built_collection collection fixnum meta]
- characters 1.3.0
- checked_yaml 2.0.3 [json_annotation source_span yaml]
- cli_util 0.4.1 [meta path]
- clock 1.1.1
- cloud_firestore_platform_interface 6.4.1 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 4.3.0 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins]
- code_builder 4.10.0 [built_collection built_value collection matcher meta]
- collection 1.19.0
- convert 3.1.1 [typed_data]
- crypto 3.0.5 [typed_data]
- dart_style 2.3.7 [analyzer args collection package_config path pub_semver source_span]
- fake_async 1.3.1 [clock collection]
- file 7.0.0 [meta path]
- firebase_auth_platform_interface 7.4.5 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 5.13.0 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser meta web]
- firebase_core_platform_interface 5.2.1 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 2.18.0 [firebase_core_platform_interface flutter flutter_web_plugins meta web]
- fixnum 1.1.0
- flutter_shaders 0.1.2 [flutter vector_math]
- flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math]
- frontend_server_client 4.0.0 [async path]
- glob 2.1.2 [async collection file path string_scanner]
- google_identity_services_web 0.3.1+4 [meta web]
- google_sign_in_android 6.1.30 [flutter google_sign_in_platform_interface]
- google_sign_in_ios 5.7.7 [flutter google_sign_in_platform_interface]
- google_sign_in_platform_interface 2.4.5 [flutter plugin_platform_interface]
- google_sign_in_web 0.12.4+2 [flutter flutter_web_plugins google_identity_services_web google_sign_in_platform_interface http web]
- graphs 2.3.2 [collection]
- http 1.2.2 [async http_parser meta web]
- http_multi_server 3.2.1 [async]
- http_parser 4.1.0 [collection source_span string_scanner typed_data]
- image 4.2.0 [archive meta xml]
- io 1.0.4 [meta path string_scanner]
- js 0.7.1
- json_annotation 4.9.0 [meta]
- 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
- logging 1.2.0
- macros 0.1.2-main.4 [_macros]
- matcher 0.12.16+1 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.11.1 [collection]
- meta 1.15.0
- mime 1.0.6
- package_config 2.1.0 [path]
- path 1.9.0
- petitparser 6.0.2 [meta]
- plugin_platform_interface 2.1.8 [meta]
- pool 1.5.1 [async stack_trace]
- pub_semver 2.1.4 [collection meta]
- pubspec_parse 1.3.0 [checked_yaml collection json_annotation pub_semver yaml]
- shelf 1.4.2 [async collection http_parser path stack_trace stream_channel]
- shelf_web_socket 2.0.0 [shelf stream_channel web_socket_channel]
- 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.3.0 [source_span]
- term_glyph 1.2.1
- test_api 0.7.3 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph]
- timing 1.0.1 [json_annotation]
- typed_data 1.3.2 [collection]
- vector_math 2.1.4
- vm_service 14.2.4
- watcher 1.1.0 [async path]
- web 1.0.0
- web_socket 0.1.6 [web]
- web_socket_channel 3.0.1 [async crypto stream_channel web web_socket]
- xml 6.5.0 [collection meta petitparser]
- yaml 3.1.2 [collection source_span string_scanner]

Additional context and comments

 flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[βœ“] Flutter (Channel beta, 3.25.0-0.1.pre, on macOS 12.7.6 21H1320 darwin-x64, locale en-GB)
[βœ“] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[!] Xcode - develop for iOS and macOS (Xcode 14.2)
    ! Flutter recommends a minimum Xcode version of 15.
      Download the latest version or update via the Mac App Store.
[βœ“] Chrome - develop for the web
[βœ“] Android Studio (version 2024.1)
[βœ“] VS Code (version 1.93.0)
[βœ“] Connected device (2 available)
[βœ“] Network resources
SelaseKay commented 1 month ago

Hi @olostan , kindly update your Xcode and try again.

olostan commented 1 month ago

Oh, unfortunately I am limited to Xcode 14.2 (Intel CPU) so that's the last version I can try.

Can you confirm that this is an Xcode version limitation? It would be good to mention

sachithqubicle commented 1 month ago

I am also facing same issue is it Xcode version Issue?

SelaseKay commented 1 month ago

Hi @olostan , I believe that could be the reason. It is recommended to use a minimum Xcode version of 15. as stated in your flutter doctor output.

google-oss-bot commented 1 month ago

Hey @olostan. 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!

olostan commented 1 month ago

I believe that is not the "recommended" version but "required" as there is no way it could be built on XCode 14.

SelaseKay commented 1 month ago

Yes. Exactly. I'll go ahead and close this for now since it's beyond the scope of this repo.

Henryderson commented 1 month ago

Pls anyone with a solution to this issue? I have the exact same issue