Skip to content
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

🐛 [cloud_firestore] Xcode build fails with errors: Expected a type in FirebaseFirestoreUtils.h #9015

Closed
whiplashoo opened this issue Jul 1, 2022 · 129 comments
Assignees
Labels
impact: crowd Affects many people, though not necessarily a specific customer with an assigned label. (P2) platform: ios Issues / PRs which are specifically for iOS. plugin: cloud_firestore resolution: fixed A fix has been merged or is pending merge from a PR. type: bug Something isn't working

Comments

@whiplashoo
Copy link

Bug report

After upgrading the Firebase dependencies to latest versions, I get the following errors when trying to build for iOS:

Parse Issue (Xcode): Expected a type
/Users/whidev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.0/ios/Classes/Private/FLT
FirebaseFirestoreUtils.h:42:3


Parse Issue (Xcode): Expected a type
/Users/whidev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.0/ios/Classes/Private/FLT
FirebaseFirestoreUtils.h:44:3


Parse Issue (Xcode): Expected a type
/Users/whidev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.0/ios/Classes/Private/FLT
FirebaseFirestoreUtils.h:45:39


Parse Issue (Xcode): Expected a type
/Users/whidev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.0/ios/Classes/FLTFirebase
FirestoreWriter.m:82:39


Parse Issue (Xcode): Expected a type
/Users/whidev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.0/ios/Classes/FLTFirebase
FirestoreWriter.m:89:37


Parse Issue (Xcode): Expected a type
/Users/whidev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.0/ios/Classes/FLTFirebase
FirestoreWriter.m:135:39


Parse Issue (Xcode): Expected a type
/Users/whidev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.0/ios/Classes/FLTFirebase
FirestoreWriter.m:143:45


Parse Issue (Xcode): Expected a type
/Users/whidev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.0/ios/Classes/FLTFirebase
FirestoreWriter.m:166:36


Semantic Issue (Xcode): Use of undeclared identifier 'FIRTimestamp'
/Users/whidev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.0/ios/Classes/FLTFirebase
FirestoreWriter.m:18:35


Semantic Issue (Xcode): Unknown type name 'FIRTimestamp'; did you mean 'CVTimeStamp'?
/Users/whidev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.0/ios/Classes/FLTFirebase
FirestoreWriter.m:19:4


ARC Casting Rules (Xcode): Implicit conversion of Objective-C pointer type 'id' to C pointer type 'CVTimeStamp
*' requires a bridged cast
/Users/whidev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.0/ios/Classes/FLTFirebase
FirestoreWriter.m:19:30


Semantic Issue (Xcode): Member reference type 'CVTimeStamp *' is a pointer; did you mean to use '->'?
/Users/whidev/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.0/ios/Classes/FLTFirebase
FirestoreWriter.m:20:30

Steps to reproduce

Steps to reproduce the behavior:

  1. pub upgrade to the latest dependencies.
  2. Use the pre-download hint for Firestore iOS SDK, where in Podfile I add this line:
 pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '9.2.0'
  1. Try flutter run on an iOS simulator.
  2. Error is thrown during the Xcode build process.


Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand
[✓] Flutter (Channel stable, 3.0.3, on macOS 12.4 21F79 darwin-arm, locale en-GR)
    • Flutter version 3.0.3 at /Users/whidev/Developer/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 676cefaaff (9 days ago), 2022-06-22 11:34:49 -0700
    • Engine revision ffe7b86a1e
    • Dart version 2.17.5
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at /Users/whidev/Library/Android/sdk
    • Platform android-32, build-tools 32.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)

Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand
Dart SDK 2.17.5
Flutter SDK 3.0.3
mapchart 3.9.0+63

dependencies:
- cloud_firestore 3.2.0 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta]
- collection 1.16.0
- firebase_app_check 0.0.6+15 [firebase_app_check_platform_interface firebase_app_check_web firebase_core firebase_core_platform_interface flutter]
- firebase_auth 3.4.0 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 1.19.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_crashlytics 2.8.3 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace]
- firebase_database 9.0.17 [firebase_core firebase_core_platform_interface firebase_database_platform_interface firebase_database_web flutter]
- flash 2.0.3+2 [flutter]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- flutter_colorpicker 1.0.3 [flutter]
- flutter_file_dialog 2.3.0 [flutter]
- flutter_font_picker 0.5.0 [flutter google_fonts shared_preferences]
- flutter_slidable 1.3.0 [flutter]
- flutterfire_ui 0.4.2+1 [cloud_firestore collection crypto desktop_webview_auth email_validator firebase_auth firebase_core firebase_database firebase_dynamic_links flutter flutter_facebook_auth flutter_localizations flutter_svg google_sign_in sign_in_with_apple twitter_login]
- in_app_review 2.0.4 [flutter in_app_review_platform_interface]
- intl 0.17.0 [clock path]
- package_info_plus 1.4.2 [flutter package_info_plus_platform_interface package_info_plus_linux package_info_plus_macos package_info_plus_windows package_info_plus_web]
- path_drawing 1.0.0 [vector_math meta path_parsing flutter]
- path_provider 2.0.11 [flutter path_provider_android path_provider_ios path_provider_linux path_provider_macos path_provider_platform_interface path_provider_windows]
- patterns_canvas 0.4.0 [flutter]
- provider 6.0.3 [collection flutter nested]
- purchases_flutter 3.10.0 [flutter freezed_annotation json_annotation]
- share 2.0.4 [meta mime flutter]
- shared_preferences 2.0.15 [flutter shared_preferences_android shared_preferences_ios shared_preferences_linux shared_preferences_macos shared_preferences_platform_interface shared_preferences_web shared_preferences_windows]
- sized_context 1.0.0+1 [flutter universal_platform]
- timeago 3.2.2
- touchable 1.0.0-prerelease [flutter]
- url_launcher 6.1.4 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows]
- xml 6.1.0 [collection meta petitparser]

dev dependencies:
- dart_code_metrics 4.16.0 [analyzer analyzer_plugin ansicolor args collection crypto file glob html meta path source_span xml yaml]
- flutter_lints 2.0.1 [lints]
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph]
- test 1.21.1 [analyzer async boolean_selector collection coverage http_multi_server io js node_preamble package_config path pool shelf shelf_packages_handler shelf_static shelf_web_socket source_span stack_trace stream_channel typed_data web_socket_channel webkit_inspection_protocol yaml test_api test_core]

transitive dependencies:
- _fe_analyzer_shared 40.0.0 [meta]
- analyzer 4.1.0 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml]
- analyzer_plugin 0.10.0 [analyzer collection dart_style pub_semver yaml]
- ansicolor 2.0.1
- args 2.3.1
- async 2.8.2 [collection meta]
- boolean_selector 2.1.0 [source_span string_scanner]
- characters 1.2.0
- charcode 1.3.1
- clock 1.1.0
- cloud_firestore_platform_interface 5.5.9 [collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 2.6.18 [cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js]
- convert 3.0.2 [typed_data]
- coverage 1.3.2 [args logging package_config path source_maps stack_trace vm_service]
- crypto 3.0.2 [typed_data]
- csslib 0.17.2 [source_span]
- dart_style 2.2.3 [analyzer args path pub_semver source_span]
- desktop_webview_auth 0.0.9 [crypto flutter http]
- email_validator 2.0.1
- fake_async 1.3.0 [clock collection]
- ffi 1.2.1
- file 6.1.2 [meta path]
- firebase_app_check_platform_interface 0.0.4+9 [firebase_core flutter meta plugin_platform_interface]
- firebase_app_check_web 0.0.5+15 [firebase_app_check_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins js]
- firebase_auth_platform_interface 6.3.0 [firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 3.3.18 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta]
- firebase_core_platform_interface 4.4.1 [collection flutter meta plugin_platform_interface]
- firebase_core_web 1.6.5 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- firebase_crashlytics_platform_interface 3.2.9 [collection firebase_core flutter meta plugin_platform_interface]
- firebase_database_platform_interface 0.2.1+9 [collection firebase_core flutter meta plugin_platform_interface]
- firebase_database_web 0.2.0+16 [firebase_core firebase_core_web firebase_database_platform_interface flutter flutter_web_plugins js]
- firebase_dynamic_links 4.3.0 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface]
- firebase_dynamic_links_platform_interface 0.2.3+5 [firebase_core flutter meta plugin_platform_interface]
- flutter_facebook_auth 4.3.4+2 [flutter flutter_facebook_auth_platform_interface flutter_facebook_auth_web]
- flutter_facebook_auth_platform_interface 3.1.2 [flutter plugin_platform_interface]
- flutter_facebook_auth_web 3.1.2 [flutter flutter_web_plugins js flutter_facebook_auth_platform_interface]
- flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math]
- flutter_svg 1.1.1 [flutter meta path_drawing vector_math xml]
- flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math]
- freezed_annotation 1.1.0 [collection json_annotation meta]
- frontend_server_client 2.1.3 [async path]
- glob 2.1.0 [async collection file path string_scanner]
- google_fonts 3.0.1 [flutter http path_provider crypto]
- google_sign_in 5.3.3 [flutter google_sign_in_android google_sign_in_ios google_sign_in_platform_interface google_sign_in_web]
- google_sign_in_android 5.2.8 [flutter google_sign_in_platform_interface]
- google_sign_in_ios 5.3.1 [flutter google_sign_in_platform_interface]
- google_sign_in_platform_interface 2.2.0 [flutter quiver]
- google_sign_in_web 0.10.1+3 [flutter flutter_web_plugins google_sign_in_platform_interface js]
- html 0.15.0 [csslib source_span]
- http 0.13.4 [async http_parser meta path]
- http_multi_server 3.2.1 [async]
- http_parser 4.0.1 [collection source_span string_scanner typed_data]
- in_app_review_platform_interface 2.0.3 [flutter url_launcher plugin_platform_interface platform]
- io 1.0.3 [meta path string_scanner]
- js 0.6.4
- json_annotation 4.5.0 [meta]
- lints 2.0.0
- logging 1.0.2
- matcher 0.12.11 [stack_trace]
- material_color_utilities 0.1.4
- meta 1.7.0
- mime 1.0.2
- nested 1.0.0 [flutter]
- node_preamble 2.0.1
- package_config 2.1.0 [path]
- package_info_plus_linux 1.0.5 [package_info_plus_platform_interface flutter path]
- package_info_plus_macos 1.3.0 [flutter]
- package_info_plus_platform_interface 1.0.2 [flutter meta plugin_platform_interface]
- package_info_plus_web 1.0.5 [flutter flutter_web_plugins http meta package_info_plus_platform_interface]
- package_info_plus_windows 1.0.5 [package_info_plus_platform_interface ffi flutter win32]
- path 1.8.1
- path_parsing 1.0.0 [vector_math meta]
- path_provider_android 2.0.16 [flutter path_provider_platform_interface]
- path_provider_ios 2.0.10 [flutter path_provider_platform_interface]
- path_provider_linux 2.1.7 [ffi flutter path path_provider_platform_interface xdg_directories]
- path_provider_macos 2.0.6 [flutter path_provider_platform_interface]
- path_provider_platform_interface 2.0.4 [flutter platform plugin_platform_interface]
- path_provider_windows 2.0.7 [ffi flutter path path_provider_platform_interface win32]
- petitparser 5.0.0 [meta]
- platform 3.1.0
- plugin_platform_interface 2.1.2 [meta]
- pool 1.5.1 [async stack_trace]
- process 4.2.4 [file path platform]
- pub_semver 2.1.1 [collection meta]
- quiver 3.1.0 [matcher]
- shared_preferences_android 2.0.12 [flutter shared_preferences_platform_interface]
- shared_preferences_ios 2.1.1 [flutter shared_preferences_platform_interface]
- shared_preferences_linux 2.1.1 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface]
- shared_preferences_macos 2.0.4 [flutter shared_preferences_platform_interface]
- shared_preferences_platform_interface 2.0.0 [flutter]
- shared_preferences_web 2.0.4 [flutter flutter_web_plugins shared_preferences_platform_interface]
- shared_preferences_windows 2.1.1 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface]
- shelf 1.3.1 [async collection http_parser path stack_trace stream_channel]
- shelf_packages_handler 3.0.1 [path shelf shelf_static]
- shelf_static 1.1.1 [convert http_parser mime path shelf]
- shelf_web_socket 1.0.2 [shelf stream_channel web_socket_channel]
- sign_in_with_apple 3.3.0 [flutter meta sign_in_with_apple_platform_interface sign_in_with_apple_web]
- sign_in_with_apple_platform_interface 1.0.0 [flutter plugin_platform_interface meta]
- sign_in_with_apple_web 1.0.1 [flutter flutter_web_plugins sign_in_with_apple_platform_interface js]
- sky_engine 0.0.99
- source_map_stack_trace 2.1.0 [path stack_trace source_maps]
- source_maps 0.10.10 [source_span]
- source_span 1.8.2 [collection path term_glyph]
- stack_trace 1.10.0 [path]
- stream_channel 2.1.0 [async]
- string_scanner 1.1.0 [charcode source_span]
- term_glyph 1.2.0
- test_api 0.4.9 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher]
- test_core 0.4.13 [analyzer async args boolean_selector collection coverage frontend_server_client glob io meta package_config path pool source_map_stack_trace source_maps source_span stack_trace stream_channel vm_service yaml matcher test_api]
- twitter_login 4.2.3 [flutter crypto http]
- typed_data 1.3.1 [collection]
- universal_platform 1.0.0+1
- url_launcher_android 6.0.17 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.0.17 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.0.1 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.0.1 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.1.0 [flutter plugin_platform_interface]
- url_launcher_web 2.0.12 [flutter flutter_web_plugins url_launcher_platform_interface]
- url_launcher_windows 3.0.1 [flutter url_launcher_platform_interface]
- vector_math 2.1.2
- vm_service 8.3.0
- watcher 1.0.1 [async path]
- web_socket_channel 2.2.0 [async crypto stream_channel]
- webkit_inspection_protocol 1.1.0 [logging]
- win32 2.6.1 [ffi]
- xdg_directories 0.2.0+1 [meta path process]
- yaml 3.1.1 [collection source_span string_scanner]

@whiplashoo whiplashoo added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Jul 1, 2022
@darshankawar darshankawar added the triage Issue is currently being triaged. label Jul 1, 2022
@darshankawar
Copy link

@whiplashoo

pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '9.2.0'. For this line, if you put back previous version, let's say, 8.15.0, do you still get same error ?

@darshankawar darshankawar added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Jul 1, 2022
@whiplashoo
Copy link
Author

Using the 8.15.0 tag throws:

[!] CocoaPods could not find compatible versions for pod "FirebaseFirestore":
  In Podfile:
    FirebaseFirestore (from `https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag `8.15.0`)

    cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 3.2.0, which depends on
      Firebase/Firestore (= 9.2.0) was resolved to 9.2.0, which depends on
        FirebaseFirestore (~> 9.2.0)

I also tried to upgrade everything to the latest patches:

  firebase_core: ^1.19.1
  firebase_crashlytics: ^2.8.4
  firebase_auth: ^3.4.1
  firebase_database: ^9.0.18
  flutterfire_ui: ^0.4.2+2
  cloud_firestore: ^3.2.1
  firebase_app_check: ^0.0.6+16

and with tag 9.2.0, I still get the original error.

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Jul 1, 2022
@whiplashoo
Copy link
Author

Same error logs in #9012

@iNeedHelpX
Copy link

Had this issue this morning.. What a problem it was! Took me a few hours to figure out. Everything is working now though!

What did I do? I tried cleaning my project out, deleted ios file and ran flutter create . a few times with no luck... Pulled my hair out!

What fixed it?

  • update your gems
  • delete ios file for the 5th time (LOL)
  • delete "derived data" in xcode and clean build folder in xcode

run flutter clean inside your project and then run flutter pub cache repair

Then you need to manually update your pubspec.yaml with the latest version of firebase core, etc. Yes make sure you delete lock file first then manually update the dependencies. DO NOT run flutter pub upgrade. Won't work.. Just manually add them in :(

@whiplashoo
Copy link
Author

delete ios file for the 5th time (LOL)

You mean to delete the iOS folder, right?

In any case, I did the rest of the steps, with no luck. Still getting the same errors in Xcode build process.

@iNeedHelpX
Copy link

iNeedHelpX commented Jul 1, 2022

delete ios file for the 5th time (LOL)

You mean to delete the iOS folder, right?

In any case, I did the rest of the steps, with no luck. Still getting the same errors in Xcode build process.

yes exactly..

basically you need to manually update all your dependencies and clean things out..
but here is my more detailed answer here: https://stackoverflow.com/questions/72816030/missingpluginexception-missingpluginexceptionno-implementation-found-for-metho/72833854#72833854

@iNeedHelpX
Copy link

iNeedHelpX commented Jul 1, 2022

Copy/paste of my stackoverflow answer

Had this issue this morning.. What a problem it was! Took me a few hours to figure out. Everything is working now though!

What did I do? I tried cleaning my project out, deleted ios file and ran flutter create . a few times with no luck... Pulled my hair out!

What fixed it?

  • update your gems
  • delete ios file for the 5th time (LOL)
  • delete "derived data" in xcode and clean build folder in xcode

run flutter clean inside your project and then run flutter pub cache repair

Then you need to manually update your pubspec.yaml with the latest version of firebase core, etc. Yes make sure you delete lock file first then manually update the dependencies. DO NOT run flutter pub upgrade. Won't work.. Just manually add them in :(

This is what I manually added into my pubspec.yaml:

cloud_firestore: ^3.2.1
firebase_core: ^1.19.1
firebase_storage: ^10.3.1
firebase_auth: ^3.4.1
firebase_messaging: ^11.4.4

@garrettApproachableGeek
Copy link

garrettApproachableGeek commented Jul 1, 2022

We are hitting these same errors. The following doesn't seem to address the issue.
Removing ios folder
flutter create .
flutter clean
flutter pub cache repair

Dependencies:

firebase_core: 1.19.1
cloud_firestore: 3.2.1

@whiplashoo
Copy link
Author

It seems that building for physical device works. Building for Simulator device throws the errors.

@garrettApproachableGeek
Copy link

Temporary patch fix: If you remove the precompiled iOS framework (From Podfile) the issue seems to go away

pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '9.2.0'

@pedropacheco92
Copy link

@garrettApproachableGeek it worked thanks! No need to create or clean anything, Just did a pod update.

I'm using

  cloud_firestore: ^3.2.1
  firebase_core: ^1.19.1

and

platform :ios, '11.0'

@whiplashoo
Copy link
Author

whiplashoo commented Jul 2, 2022

Temporary patch fix: If you remove the precompiled iOS framework (From Podfile) the issue seems to go away

Indeed, it worked without the precompiled iOS framework, though it took like 9 minutes to build.

@nialljawad96
Copy link

I have been having the same errors since upgrading the Firebase dependencies to the latest versions, and have been using the precompiled Firebase SDK to save on loading times. Unfortunately been spinning my head for the past 8 hours trying to figure this out.

Removing the precompiled framework from the Podfile as suggested above does indeed fix it for now, but with the downside of hugely increased compiling times.

But at least there's no errors!

@walsha2
Copy link

walsha2 commented Jul 3, 2022

Confirmed what others are saying above. Removing the 9.2.0 precompiled iOS framework works but results in much longer build times. Relevant issue here: invertase/firestore-ios-sdk-frameworks#53

@dndeus
Copy link

dndeus commented Jul 3, 2022

Is there a way to downgrade the version to a working state just to keep developing our projects until this gets resolved?

I don't think waiting 5-10 minutes every time is a viable solution

Thanks!

@themumy10
Copy link

Same issue for me i lost about 3 hours searching for the reason. Finally found but compile times are huge. Thanks time killer firebase you did it again :(

@Lyokone
Copy link
Contributor

Lyokone commented Jul 4, 2022

Hello,
Can you confirm if you're using an Intel mac or an M1 mac?

@kiliankoller
Copy link

Same issue here on Intel...

@torindev
Copy link

torindev commented Jul 4, 2022

Mac mini 2018 intel core-i5, same issue. Build time is about 15-18 minutes on an empty project with only firebase dependencies

@KKimj
Copy link
Contributor

KKimj commented Jul 4, 2022

** Developers who want to keep Firebase SDK Version 8.15.0 or do not intend to update to 9.2.0 **

image

We should avoid using caret (^) sign on pubspec yaml with firebase packages!

e.g.,
cloud_firestore: ^3.1.18 -> cloud_firestore: 3.1.18

ref about caret (^) sign
-> https://stackoverflow.com/questions/53563079/what-is-the-caret-sign-before-the-dependency-version-number-in-flutters-pub

Have a Nice Day!

@themumy10
Copy link

Hello,

Can you confirm if you're using an Intel mac or an M1 mac?

Intel for me

@russellwheatley
Copy link
Member

russellwheatley commented Jul 4, 2022

Hey folks, there was a problem with the precompiled FirebaseFirestore pod, we had to merge a patch for firebase-ios-sdk 9.2.0 that is only available on the main branch. So you can get the precompiled version like so if you wish:

pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :branch => 'main'

In the next firebase-ios-sdk release, you will be able to revert back to using the previous implementation. i.e. the version:

# assuming next firebase-ios-sdk release is 9.3.0
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '9.3.0'

@kiliankoller
Copy link

Still not working...

`kkoller@kk:~/Documents/anakin/wtc/git/wtc # flutter pub upgrade
Resolving dependencies...

_fe_analyzer_shared 41.0.0 (was 40.0.0)
analyzer 4.2.0 (was 4.1.0)
archive 3.3.0
args 2.3.1
async 2.8.2 (2.9.0 available)
audio_service 0.18.6
audio_service_platform_interface 0.1.0
audio_service_web 0.1.1
audio_session 0.1.8 (was 0.1.7)
audio_video_progress_bar 0.10.0
boolean_selector 2.1.0
build 2.3.0
build_config 1.0.0
build_daemon 3.1.0
build_resolvers 2.0.9
build_runner 2.1.11
build_runner_core 7.2.3
built_collection 5.1.1
built_value 8.3.3
carousel_slider 4.1.1
characters 1.2.0 (1.2.1 available)
charcode 1.3.1
checked_yaml 2.0.1
chewie 1.3.4
clock 1.1.0 (1.1.1 available)
cloud_firestore 3.2.1
cloud_firestore_platform_interface 5.5.10
cloud_firestore_web 2.6.19
code_builder 4.1.0
collection 1.16.0
convert 3.0.2
crypto 3.0.2
csslib 0.17.2
cupertino_icons 1.0.5
dart_style 2.2.3
fake_async 1.3.0 (1.3.1 available)
ffi 2.0.1 (was 2.0.0)
file 6.1.2
firebase_analytics 9.1.12
firebase_analytics_platform_interface 3.1.10
firebase_analytics_web 0.4.0+17
firebase_auth 3.4.1
firebase_auth_platform_interface 6.3.1
firebase_auth_web 3.3.19
firebase_core 1.19.1
firebase_core_platform_interface 4.4.3
firebase_core_web 1.6.6
firebase_crashlytics 2.8.4
firebase_crashlytics_platform_interface 3.2.10
firebase_messaging 11.4.4
firebase_messaging_platform_interface 3.5.4
firebase_messaging_web 2.4.4
fixnum 1.0.1
flutter 0.0.0 from sdk flutter
flutter_app_badger 1.4.0
flutter_cache_manager 3.3.0
flutter_launcher_icons 0.9.3
flutter_lints 2.0.1
flutter_localizations 0.0.0 from sdk flutter
flutter_svg 1.1.1+1
flutter_test 0.0.0 from sdk flutter
flutter_web_plugins 0.0.0 from sdk flutter
frontend_server_client 2.1.3
get_it 7.2.0
glob 2.1.0
graphs 2.1.0
html 0.15.0
http 0.13.4
http_multi_server 3.2.1
http_parser 4.0.1
image 3.2.0
intl 0.17.0
io 1.0.3
js 0.6.4
json_annotation 4.5.0
json_class 2.1.2+7
json_schema2 2.0.2+4
json_serializable 6.2.0
json_theme 4.0.0+4
just_audio 0.9.27
just_audio_platform_interface 4.2.0
just_audio_web 0.4.7
lints 2.0.0
logging 1.0.2
matcher 0.12.11 (0.12.12 available)
material_color_utilities 0.1.4 (0.1.5 available)
meta 1.7.0 (1.8.0 available)
mime 1.0.2
nested 1.0.0
package_config 2.1.0
path 1.8.1 (1.8.2 available)
path_drawing 1.0.0
path_parsing 1.0.0
path_provider 2.0.11
path_provider_android 2.0.16 (was 2.0.15)
path_provider_ios 2.0.10
path_provider_linux 2.1.7
path_provider_macos 2.0.6
path_provider_platform_interface 2.0.4
path_provider_windows 2.1.0
pedantic 1.11.1
petitparser 5.0.0
platform 3.1.0
plugin_platform_interface 2.1.2
pool 1.5.1
process 4.2.4
provider 6.0.3
pub_semver 2.1.1
pubspec_parse 1.2.0
quiver 3.1.0
rest_client 2.1.4+4
rxdart 0.27.4
shelf 1.3.1
shelf_web_socket 1.0.2
sky_engine 0.0.99 from sdk flutter
source_gen 1.2.2
source_helper 1.3.2
source_span 1.8.2 (1.9.0 available)
sqflite 2.0.2+1
sqflite_common 2.2.1+1
stack_trace 1.10.0
stream_channel 2.1.0
stream_transform 2.0.0
string_scanner 1.1.0 (1.1.1 available)
synchronized 3.0.0+2
term_glyph 1.2.0 (1.2.1 available)
test_api 0.4.9 (0.4.11 available)
timing 1.0.0
typed_data 1.3.1
uri 1.0.0
url_launcher 6.1.4
url_launcher_android 6.0.17
url_launcher_ios 6.0.17
url_launcher_linux 3.0.1
url_launcher_macos 3.0.1
url_launcher_platform_interface 2.1.0
url_launcher_web 2.0.12
url_launcher_windows 3.0.1
uuid 3.0.6
vector_math 2.1.2
video_player 2.4.5
video_player_android 2.3.6
video_player_avfoundation 2.3.5
video_player_platform_interface 5.1.3
video_player_web 2.0.10
wakelock 0.6.1+2
wakelock_macos 0.4.0
wakelock_platform_interface 0.3.0
wakelock_web 0.4.0
wakelock_windows 0.2.0
watcher 1.0.1
web_socket_channel 2.2.0
win32 2.7.0
xdg_directories 0.2.0+1
xml 6.1.0
yaml 3.1.1
yaon 1.0.1+2
Changed 5 dependencies!
12 packages have newer versions incompatible with dependency constraints.
Try flutter pub outdated for more information.
kkoller@kk:~/Documents/anakin/wtc/git/wtc # flutter build ios
Building de.instituteforcompassion.wtc for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: XSDV46UGY8
Running pod install... 7,3s
Running Xcode build...
Xcode build done. 36,5s
Failed to build iOS app
Error output from Xcode build:

2022-07-04 12:07:11.113 xcodebuild[48210:267635] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in
com.apple.dt.IDEWatchSupportCore
2022-07-04 12:07:11.113 xcodebuild[48210:267635] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in
com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **

Xcode's output:

Writing result bundle at path:
/var/folders/db/c4w3cy611t91j0_zzs2n6gsc0000gn/T/flutter_tools.UUId4F/flutter_ios_build_temp_dir0ZBvJZ/temporary_xcresult_bundle

warning: [CP] FirebaseFirestore.xcframework: Unable to find matching slice in 'ios-arm64_x86_64-simulator ios-arm64_x86_64-maccatalyst ios-arm64' for the current build architectures (arm64 armv7) and platform (-iphoneos).
warning: [CP] gRPC-Core.xcframework: Unable to find matching slice in 'ios-arm64_x86_64-maccatalyst ios-arm64_x86_64-simulator ios-arm64' for the current build architectures (arm64 armv7) and platform (-iphoneos).
warning: [CP] Libuv-gRPC.xcframework: Unable to find matching slice in 'ios-arm64_x86_64-simulator ios-arm64 ios-arm64_x86_64-maccatalyst' for the current build architectures (arm64 armv7) and platform (-iphoneos).
warning: [CP] gRPC-C++.xcframework: Unable to find matching slice in 'ios-arm64_x86_64-simulator ios-arm64 ios-arm64_x86_64-maccatalyst' for the current build architectures (arm64 armv7) and platform (-iphoneos).
warning: [CP] BoringSSL-GRPC.xcframework: Unable to find matching slice in 'ios-arm64 ios-arm64_x86_64-maccatalyst ios-arm64_x86_64-simulator' for the current build architectures (arm64 armv7) and platform (-iphoneos).
warning: [CP] FirebaseFirestoreSwift.xcframework: Unable to find matching slice in 'ios-arm64 ios-arm64_x86_64-maccatalyst ios-arm64_x86_64-simulator' for the current build architectures (arm64 armv7) and platform (-iphoneos).
warning: [CP] abseil.xcframework: Unable to find matching slice in 'ios-arm64 ios-arm64_x86_64-simulator ios-arm64_x86_64-maccatalyst' for the current build architectures (arm64 armv7) and platform (-iphoneos).
warning: [CP] leveldb-library.xcframework: Unable to find matching slice in 'ios-arm64 ios-arm64_x86_64-maccatalyst ios-arm64_x86_64-simulator' for the current build architectures (arm64 armv7) and platform (-iphoneos).
/Users/kkoller/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.19.1/ios/Classes/FLTFirebaseCorePlugin.m:229:50: warning: incompatible pointer to integer conversion sending 'NSNumber * _Nonnull __strong' to parameter of type 'BOOL'
(aka 'signed char') [-Wint-conversion]
    [firebaseApp setDataCollectionDefaultEnabled:enabled];
                                                 ^~~~~~~
In module 'FirebaseCore' imported from /Users/kkoller/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.19.1/ios/Classes/FLTFirebasePlugin.h:10:
/Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/FirebaseCore/FirebaseCore/Sources/Public/FirebaseCore/FIRApp.h:125:10: note: passing argument to parameter 'dataCollectionDefaultEnabled' here
    BOOL dataCollectionDefaultEnabled;
         ^
1 warning generated.
While building module 'FirebaseMessaging' imported from /Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/Headers/Public/Firebase/Firebase.h:66:
In file included from <module-includes>:1:
In file included from /Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/Target Support Files/FirebaseMessaging/FirebaseMessaging-umbrella.h:13:
In file included from /Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FirebaseMessaging/FirebaseMessaging.h:18:
/Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FirebaseMessaging/FIRMessagingExtensionHelper.h:37:38: warning: 'UNMutableNotificationContent' is only available on iOS 10.0 or newer
[-Wunguarded-availability]
- (void)populateNotificationContent:(UNMutableNotificationContent *)content
                                     ^
In module 'UserNotifications' imported from /Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FirebaseMessaging/FIRMessagingExtensionHelper.h:22:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.5.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationContent.h:97:12: note: 'UNMutableNotificationContent' has been marked as
being introduced in iOS 10.0 here, but the deployment target is iOS 9.0.0
@interface UNMutableNotificationContent : UNNotificationContent
           ^
While building module 'FirebaseMessaging' imported from /Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/Headers/Public/Firebase/Firebase.h:66:
In file included from <module-includes>:1:
In file included from /Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/Target Support Files/FirebaseMessaging/FirebaseMessaging-umbrella.h:13:
In file included from /Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FirebaseMessaging/FirebaseMessaging.h:18:
/Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FirebaseMessaging/FIRMessagingExtensionHelper.h:37:1: note: annotate 'populateNotificationContent:withContentHandler:' with an availability attribute to
silence this warning
- (void)populateNotificationContent:(UNMutableNotificationContent *)content
^
/Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FirebaseMessaging/FIRMessagingExtensionHelper.h:38:47: warning: 'UNNotificationContent' is only available on iOS 10.0 or newer
[-Wunguarded-availability]
                 withContentHandler:(void (^)(UNNotificationContent *_Nonnull))contentHandler;
                                              ^
In module 'UserNotifications' imported from /Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FirebaseMessaging/FIRMessagingExtensionHelper.h:22:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.5.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationContent.h:37:12: note: 'UNNotificationContent' has been marked as being
introduced in iOS 10.0 here, but the deployment target is iOS 9.0.0
@interface UNNotificationContent : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
           ^
While building module 'FirebaseMessaging' imported from /Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/Headers/Public/Firebase/Firebase.h:66:
In file included from <module-includes>:1:
In file included from /Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/Target Support Files/FirebaseMessaging/FirebaseMessaging-umbrella.h:13:
In file included from /Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FirebaseMessaging/FirebaseMessaging.h:18:
/Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FirebaseMessaging/FIRMessagingExtensionHelper.h:37:1: note: annotate 'populateNotificationContent:withContentHandler:' with an availability attribute to
silence this warning
- (void)populateNotificationContent:(UNMutableNotificationContent *)content
^
2 warnings generated.
2 warnings generated.
While building module 'FirebaseMessaging' imported from /Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/Headers/Public/Firebase/Firebase.h:66:
In file included from <module-includes>:1:
In file included from /Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/Target Support Files/FirebaseMessaging/FirebaseMessaging-umbrella.h:13:
In file included from /Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FirebaseMessaging/FirebaseMessaging.h:18:
/Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FirebaseMessaging/FIRMessagingExtensionHelper.h:37:38: warning: 'UNMutableNotificationContent' is only available on iOS 10.0 or newer
[-Wunguarded-availability]
- (void)populateNotificationContent:(UNMutableNotificationContent *)content
                                     ^
In module 'UserNotifications' imported from /Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FirebaseMessaging/FIRMessagingExtensionHelper.h:22:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.5.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationContent.h:97:12: note: 'UNMutableNotificationContent' has been marked as
being introduced in iOS 10.0 here, but the deployment target is iOS 9.0.0
@interface UNMutableNotificationContent : UNNotificationContent
           ^
While building module 'FirebaseMessaging' imported from /Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/Headers/Public/Firebase/Firebase.h:66:
In file included from <module-includes>:1:
In file included from /Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/Target Support Files/FirebaseMessaging/FirebaseMessaging-umbrella.h:13:
In file included from /Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FirebaseMessaging/FirebaseMessaging.h:18:
/Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FirebaseMessaging/FIRMessagingExtensionHelper.h:37:1: note: annotate 'populateNotificationContent:withContentHandler:' with an availability attribute to
silence this warning
- (void)populateNotificationContent:(UNMutableNotificationContent *)content
^
/Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FirebaseMessaging/FIRMessagingExtensionHelper.h:38:47: warning: 'UNNotificationContent' is only available on iOS 10.0 or newer
[-Wunguarded-availability]
                 withContentHandler:(void (^)(UNNotificationContent *_Nonnull))contentHandler;
                                              ^
In module 'UserNotifications' imported from /Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FirebaseMessaging/FIRMessagingExtensionHelper.h:22:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.5.sdk/System/Library/Frameworks/UserNotifications.framework/Headers/UNNotificationContent.h:37:12: note: 'UNNotificationContent' has been marked as being
introduced in iOS 10.0 here, but the deployment target is iOS 9.0.0
@interface UNNotificationContent : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
           ^
While building module 'FirebaseMessaging' imported from /Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/Headers/Public/Firebase/Firebase.h:66:
In file included from <module-includes>:1:
In file included from /Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/Target Support Files/FirebaseMessaging/FirebaseMessaging-umbrella.h:13:
In file included from /Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FirebaseMessaging/FirebaseMessaging.h:18:
/Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FirebaseMessaging/FIRMessagingExtensionHelper.h:37:1: note: annotate 'populateNotificationContent:withContentHandler:' with an availability attribute to
silence this warning
- (void)populateNotificationContent:(UNMutableNotificationContent *)content
^
2 warnings generated.
2 warnings generated.
In file included from /Users/kkoller/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.1/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:8:
/Users/kkoller/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.1/ios/Classes/Private/FLTFirebaseFirestoreUtils.h:43:4: error: expected a type
+ (FIRFirestoreSource)FIRFirestoreSourceFromArguments:(NSDictionary *_Nonnull)arguments;
   ^
/Users/kkoller/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.1/ios/Classes/Private/FLTFirebaseFirestoreUtils.h:45:4: error: expected a type
+ (FIRFirestore *_Nullable)getCachedFIRFirestoreInstanceForKey:(NSString *_Nonnull)key;
   ^
/Users/kkoller/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.1/ios/Classes/Private/FLTFirebaseFirestoreUtils.h:46:40: error: expected a type
+ (void)setCachedFIRFirestoreInstance:(FIRFirestore *_Nonnull)firestore
                                       ^
/Users/kkoller/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.1/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:12:33: error: no type or protocol named 'FIRListenerRegistration'
@property(readwrite, strong) id<FIRListenerRegistration> listenerRegistration;
                                ^
/Users/kkoller/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.1/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:19:3: error: use of undeclared identifier 'FIRFirestore'
  FIRFirestore *firestore = arguments[@"firestore"];
  ^
/Users/kkoller/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.1/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:19:17: error: use of undeclared identifier 'firestore'
  FIRFirestore *firestore = arguments[@"firestore"];
                ^
/Users/kkoller/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.1/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:27:32: error: use of undeclared identifier 'firestore'
  self.listenerRegistration = [firestore addSnapshotsInSyncListener:listener];
                               ^
/Users/kkoller/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.1/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:33:30: error: no known instance method for selector 'remove'
  [self.listenerRegistration remove];
                             ^~~~~~
8 errors generated.
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
/Users/kkoller/Documents/anakin/wtc/git/wtc/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.5.99. (in target 'FMDB' from project
'Pods')

Result bundle written to path:
    /var/folders/db/c4w3cy611t91j0_zzs2n6gsc0000gn/T/flutter_tools.UUId4F/flutter_ios_build_temp_dir0ZBvJZ/temporary_xcresult_bundle

Parse Issue (Xcode): Expected a type
/Users/kkoller/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.1/ios/Classes/Private/FLTFirebaseFirestoreUtils.h:42:3

Parse Issue (Xcode): Expected a type
/Users/kkoller/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.1/ios/Classes/Private/FLTFirebaseFirestoreUtils.h:44:3

Parse Issue (Xcode): Expected a type
/Users/kkoller/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.1/ios/Classes/Private/FLTFirebaseFirestoreUtils.h:45:39

Generics Issue (Xcode): No type or protocol named 'FIRListenerRegistration'
/Users/kkoller/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.1/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:11:32

Semantic Issue (Xcode): Use of undeclared identifier 'FIRFirestore'
/Users/kkoller/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.1/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:18:2

Semantic Issue (Xcode): Use of undeclared identifier 'firestore'
/Users/kkoller/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.1/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:18:16

Semantic Issue (Xcode): Use of undeclared identifier 'firestore'
/Users/kkoller/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.1/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:26:31

ARC Semantic Issue (Xcode): No known instance method for selector 'remove'
/Users/kkoller/Documents/dev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.2.1/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:32:29

Encountered error while building for device.`

@johnnyasantoss
Copy link

johnnyasantoss commented Aug 8, 2022

@russellwheatley

ios-sdk release, you will be able to revert back to using the previous implementation. i.e. the version:

Can we get a release with the fix like a 9.3.1? Or maybe a rolling tag for 9.3?

@sohrabonline
Copy link

Solution

For anyone still struggling with this, this is my working configuration (finally).

Note the need to delete the IPHONEOS_DEPLOYMENT_TARGET property (will be inherited) in the pods target loop and setting of platform :ios, '11.0'. These were the key changes that finally got this working.

# 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,
}

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
  # https://github.com/firebase/flutterfire/issues/9015 (change to 9.3.0 later)
  pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '9.3.0'

  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|
    target.build_configurations.each do |config|
      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
    end
    flutter_additional_ios_build_settings(target)
  end
end

Clean Pod Install

This might be overkill, but this is the best way I know to perform the cleanest pod install and ensure that you have no lingering pod cache issues or misconfigured Xcode settings:

cd ios
rm -rf Podfile.lock
rm -rf Pods
rm -rf pubspec.lock
pod repo update
pod cache clean --all
pod deintegrate
pod setup
pod install --repo-update

Firebase Dependencies

This is just what I use in my project. Listed here for reference purposes only in case anyone was wondering. This is not necessarily the same exact configuration you need to get this to work. Im sure other versions work as well, I am just sharing which versions I am using - for completeness.

cloud_firestore: ^3.4.3
cloud_functions: ^3.3.3
firebase_analytics: ^9.3.0
firebase_auth: ^3.6.2
firebase_core: ^1.20.0
firebase_crashlytics: ^2.8.6
firebase_database: ^9.1.0
firebase_dynamic_links: ^4.3.3
firebase_messaging: ^12.0.1
firebase_storage: ^10.3.4

THANKS FOR S O L U T I O N

@edimarvirtual
Copy link

Solution

For anyone still struggling with this, this is my working configuration (finally).

Note the need to delete the IPHONEOS_DEPLOYMENT_TARGET property (will be inherited) in the pods target loop and setting of platform :ios, '11.0'. These were the key changes that finally got this working.

# 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,
}

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
  # https://github.com/firebase/flutterfire/issues/9015 (change to 9.3.0 later)
  pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '9.3.0'

  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|
    target.build_configurations.each do |config|
      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
    end
    flutter_additional_ios_build_settings(target)
  end
end

Clean Pod Install

This might be overkill, but this is the best way I know to perform the cleanest pod install and ensure that you have no lingering pod cache issues or misconfigured Xcode settings:

cd ios
rm -rf Podfile.lock
rm -rf Pods
rm -rf pubspec.lock
pod repo update
pod cache clean --all
pod deintegrate
pod setup
pod install --repo-update

Firebase Dependencies

This is just what I use in my project. Listed here for reference purposes only in case anyone was wondering. This is not necessarily the same exact configuration you need to get this to work. Im sure other versions work as well, I am just sharing which versions I am using - for completeness.

cloud_firestore: ^3.4.3
cloud_functions: ^3.3.3
firebase_analytics: ^9.3.0
firebase_auth: ^3.6.2
firebase_core: ^1.20.0
firebase_crashlytics: ^2.8.6
firebase_database: ^9.1.0
firebase_dynamic_links: ^4.3.3
firebase_messaging: ^12.0.1
firebase_storage: ^10.3.4

it worked for me, but only on the emulator, when I use the flutter build ipa --release command, it returns the following errors:

Running pod install...                                              5,6s
Running Xcode build...                                                  
Xcode archive done.                                         113,2s
Failed to build iOS app
Error output from Xcode build:
↳
    ** ARCHIVE FAILED **


Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/rw/r162h1jd3nbdqmqdmdf_3q4h0000gn/T/flutter_tools.Tjjr1o/flutter_ios_build_temp_dirgTt52a/temporary_xcresult_bundle

    warning: [CP] Unable to find matching .xcframework slice in 'ios-arm64_x86_64-simulator ios-arm64 ios-arm64_x86_64-maccatalyst' for the current
    build architectures (arm64 armv7).
    warning: [CP] Unable to find matching .xcframework slice in 'ios-arm64_x86_64-simulator ios-arm64 ios-arm64_x86_64-maccatalyst' for the current
    build architectures (arm64 armv7).
    warning: [CP] Unable to find matching .xcframework slice in 'ios-arm64_x86_64-maccatalyst ios-arm64_x86_64-simulator ios-arm64' for the current
    build architectures (arm64 armv7).
    warning: [CP] Unable to find matching .xcframework slice in 'ios-arm64_x86_64-maccatalyst ios-arm64_x86_64-simulator ios-arm64' for the current
    build architectures (arm64 armv7).
    warning: [CP] Unable to find matching .xcframework slice in 'ios-arm64 ios-arm64_x86_64-maccatalyst ios-arm64_x86_64-simulator' for the current
    build architectures (arm64 armv7).
    warning: [CP] Unable to find matching .xcframework slice in 'ios-arm64_x86_64-simulator ios-arm64 ios-arm64_x86_64-maccatalyst' for the current
    build architectures (arm64 armv7).
    warning: [CP] Unable to find matching .xcframework slice in 'ios-arm64_x86_64-simulator ios-arm64 ios-arm64_x86_64-maccatalyst' for the current
    build architectures (arm64 armv7).
    warning: [CP] Unable to find matching .xcframework slice in 'ios-arm64 ios-arm64_x86_64-maccatalyst ios-arm64_x86_64-simulator' for the current
    build architectures (arm64 armv7).
    /Users/edimargotardo/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.20.1/ios/Classes/FLTFirebaseCorePlugin.m:229:50: warning:
    incompatible pointer to integer conversion sending 'NSNumber * _Nonnull __strong' to parameter of type 'BOOL' (aka 'signed char')
    [-Wint-conversion]
        [firebaseApp setDataCollectionDefaultEnabled:enabled];
                                                     ^~~~~~~
    In module 'FirebaseCore' imported from
    /Users/edimargotardo/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.20.1/ios/Classes/FLTFirebasePlugin.h:10:
    /Users/edimargotardo/Desenvolvimento/Delivery/app/ios/Pods/FirebaseCore/FirebaseCore/Sources/Public/FirebaseCore/FIRApp.h:125:10: note: passing
    argument to parameter 'dataCollectionDefaultEnabled' here
        BOOL dataCollectionDefaultEnabled;
             ^
    1 warning generated.
    In file included from
    /Users/edimargotardo/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.4/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:8:
    /Users/edimargotardo/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.4/ios/Classes/Private/FLTFirebaseFirestoreUtils.h:43:4: error:
    expected a type
    + (FIRFirestoreSource)FIRFirestoreSourceFromArguments:(NSDictionary *_Nonnull)arguments;
       ^
    /Users/edimargotardo/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.4/ios/Classes/Private/FLTFirebaseFirestoreUtils.h:45:4: error:
    expected a type
    + (FIRFirestore *_Nullable)getCachedFIRFirestoreInstanceForKey:(NSString *_Nonnull)key;
       ^
    /Users/edimargotardo/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.4/ios/Classes/Private/FLTFirebaseFirestoreUtils.h:46:40:
    error: expected a type
    + (void)setCachedFIRFirestoreInstance:(FIRFirestore *_Nonnull)firestore
                                           ^
    /Users/edimargotardo/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.4/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:12:33: error:
    no type or protocol named 'FIRListenerRegistration'
    @property(readwrite, strong) id<FIRListenerRegistration> listenerRegistration;
                                    ^
    /Users/edimargotardo/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.4/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:19:3: error:
    use of undeclared identifier 'FIRFirestore'
      FIRFirestore *firestore = arguments[@"firestore"];
      ^
    /Users/edimargotardo/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.4/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:19:17: error:
    use of undeclared identifier 'firestore'
      FIRFirestore *firestore = arguments[@"firestore"];
                    ^
    /Users/edimargotardo/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.4/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:27:32: error:
    use of undeclared identifier 'firestore'
      self.listenerRegistration = [firestore addSnapshotsInSyncListener:listener];
                                   ^
    /Users/edimargotardo/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.4/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:33:30: error:
    no known instance method for selector 'remove'
      [self.listenerRegistration remove];
                                 ^~~~~~
    8 errors generated.
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in dependency order

    Result bundle written to path:
        /var/folders/rw/r162h1jd3nbdqmqdmdf_3q4h0000gn/T/flutter_tools.Tjjr1o/flutter_ios_build_temp_dirgTt52a/temporary_xcresult_bundle


Parse Issue (Xcode): Expected a type
/Users/edimargotardo/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.4/ios/Classes/Private/FLTFirebaseFirestoreUtils.h:42:3


Parse Issue (Xcode): Expected a type
/Users/edimargotardo/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.4/ios/Classes/Private/FLTFirebaseFirestoreUtils.h:44:3


Parse Issue (Xcode): Expected a type
/Users/edimargotardo/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.4/ios/Classes/Private/FLTFirebaseFirestoreUtils.h:45:39


Generics Issue (Xcode): No type or protocol named 'FIRListenerRegistration'
/Users/edimargotardo/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.4/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:11:32


Semantic Issue (Xcode): Use of undeclared identifier 'FIRFirestore'
/Users/edimargotardo/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.4/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:18:2


Semantic Issue (Xcode): Use of undeclared identifier 'firestore'
/Users/edimargotardo/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.4/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:18:16


Semantic Issue (Xcode): Use of undeclared identifier 'firestore'
/Users/edimargotardo/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.4/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:26:31


ARC Semantic Issue (Xcode): No known instance method for selector 'remove'
/Users/edimargotardo/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.4/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:32:29


Encountered error while archiving for device.

however, I didn't leave my podfile exactly the same as in the example. I don't know if that could be it.

my podfile:

# 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,
}

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
  # https://github.com/firebase/flutterfire/issues/9015 (change to 9.3.0 later)
  pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '9.3.0'
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

is anyone having the same problem????

@rivella50
Copy link

@edimarvirtual Try to add the mentioned post_install part in your Podfile:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
    end
    flutter_additional_ios_build_settings(target)
  end
end

@edimarvirtual
Copy link

@edimarvirtual Try to add the mentioned post_install part in your Podfile:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
    end
    flutter_additional_ios_build_settings(target)
  end
end

@rivella50 it worked here, thanks everyone.

@victormanuelfrancodev
Copy link

victormanuelfrancodev commented Aug 18, 2022

Solution

It worked for me, please try.

Podfile
platform :ios, '14.0'

pubspec
cloud_firestore: 3.2.1
firebase_analytics: ^9.3.1
firebase_core: 1.19.1
firebase_auth: ^3.6.3

Terminal
flutter clean
sudo arch -x86_64 gem install ffi
arch -x86_64 pod update

@mhmzdev
Copy link

mhmzdev commented Aug 31, 2022

facing same issue
Anyone figured out some solution of it?

M1 Chip
Flutter 3.0.5

@LeonardoRosaa
Copy link

facing same issue Anyone figured out some solution of it?

M1 Chip Flutter 3.0.5

Unfortunately, I had to recreate my IOS project.

@mhmzdev
Copy link

mhmzdev commented Sep 1, 2022

As of now the solution i've got is

  firebase_core: 1.20.0
  firebase_auth: 3.5.0
  cloud_firestore: 3.1.18

Followed by command in ios/
flutter clean; flutter pub get; rm -rf Pods; rm -rf Podfile.lock; pod install

@vincentliu98
Copy link

I was able to resolve the issue using the following configurations:

Podfile

Set a global platform in the beginning. "11.0" probably will work, too.
platform :ios, '12.0'

Set the tag to 9.4.0 and use the latest version of firebase packages (see the version numbers below)

target 'Runner' do
  pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '9.4.0'

Delete the IPHONEOS_DEPLOYMENT_TARGET property

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
    end
  end
end

pubspec.yaml

These are the latest version of the firebase pub packages I use. You can find other latest ones on pub that are published for firebase 9.4.0 sdk.

  cloud_firestore: ^3.4.6
  cloud_functions: ^3.3.6
  firebase_analytics: ^9.3.3
  firebase_auth: ^3.7.0
  firebase_core: ^1.21.1
  firebase_crashlytics: ^2.8.9
  firebase_remote_config: ^2.0.16
  firebase_storage: ^10.3.7

@el-mimoso
Copy link

el-mimoso commented Sep 2, 2022

I was able to successfully build my xarchive.
Here is how I did it:
flutter clean
Commented the following line in my pod file.
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '9.3.0'

Then build the archive in the console
flutter build ipa

It took quite longer to build aprox 350s. But it worked for me. Hope it can help other devs 👍🏽

Edit: buildtime using mac mini m1.
Edit 2: flutter build command.

@hamishjohnson
Copy link

hamishjohnson commented Sep 5, 2022

I was able to resolve the issue using the following configurations:

Podfile

Set a global platform in the beginning. "11.0" probably will work, too. platform :ios, '12.0'

Set the tag to 9.4.0 and use the latest version of firebase packages (see the version numbers below)

target 'Runner' do
  pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '9.4.0'

Delete the IPHONEOS_DEPLOYMENT_TARGET property

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
    end
  end
end

pubspec.yaml

These are the latest version of the firebase pub packages I use. You can find other latest ones on pub that are published for firebase 9.4.0 sdk.

  cloud_firestore: ^3.4.6
  cloud_functions: ^3.3.6
  firebase_analytics: ^9.3.3
  firebase_auth: ^3.7.0
  firebase_core: ^1.21.1
  firebase_crashlytics: ^2.8.9
  firebase_remote_config: ^2.0.16
  firebase_storage: ^10.3.7

This finally worked for me for 9.4.0, and I also tried with platform :ios, '11.0' - all good

@nawafSheddi
Copy link

I was able to resolve the issue by removing
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '9.3.0'
and update Xcode to latest version

@Lyokone
Copy link
Contributor

Lyokone commented Sep 28, 2022

Hello,
As of today, using the latest version of XCode (14) and using the iOS '9.6.0' version the issue seems resolved. (don't forget to flutter clean after updating.)

The new version of iOS SDK should be released this Thursday.
The above workaround will not be needed once the new version will have been released.

@motucraft
Copy link

@Lyokone
Thanks to your information it worked.

  • Physical device: iPhone 13, iOS 16.0.2
  • Xcode 14.0.1

But without it, the build takes a very long time.

pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '9.6.0'
pubspec.yml
...
  firebase_core: ^1.24.0
  firebase_auth: ^3.11.0
  cloud_firestore: ^3.5.0
  cloud_firestore_odm: ^1.0.0-dev.32
  firebase_storage: ^10.3.10
...
Podfile
# Uncomment this line to define a global platform for your project
platform :ios, '15.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!

  pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '9.6.0'

  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)
  end
end

@JohnOyekanmi
Copy link

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
end
end

Adding this line worked for me.

@rivella50
Copy link

rivella50 commented Nov 7, 2022

Has anyone tried updating to

pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '10.0.0'

in combination with these Firebase package versions?

firebase_auth: ^4.1.0
firebase_core: ^2.1.1
cloud_firestore: ^4.0.3
firebase_storage: ^11.0.3
cloud_functions: ^4.0.3
firebase_messaging: ^14.0.3
firebase_crashlytics: ^3.0.3
firebase_analytics: ^10.0.3
firebase_app_check: ^0.1.1+2

I get the exact same errors when doing so in my project:

Xcode build done. 49.3s
Failed to build iOS app
Error output from Xcode build:

2022-11-07 14:27:05.217 xcodebuild[36681:17947341] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-11-07 14:27:05.217 xcodebuild[36681:17947341] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **

Performing these steps (which worked fine with version 9.3.0) don't succeed anymore:

cd ios
rm -rf Podfile.lock
rm -rf Pods
rm -rf pubspec.lock
pod repo update
pod cache clean --all
pod deintegrate
pod setup
pod install --repo-update

Any hints?

EDIT: Problem solved.

@russellwheatley
Copy link
Member

This is no longer an issue. You shouldn't need to update the IPHONEOS_DEPLOYMENT_TARGET either. Please bear in mind, that the minimum global deployment target is now 11 as per firebase-ios-sdk release notes.

@darshankawar darshankawar added resolution: solution-provided A solution has been provided in the issue. resolution: fixed A fix has been merged or is pending merge from a PR. and removed resolution: solution-provided A solution has been provided in the issue. labels Nov 10, 2022
@firebase firebase locked and limited conversation to collaborators Dec 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
impact: crowd Affects many people, though not necessarily a specific customer with an assigned label. (P2) platform: ios Issues / PRs which are specifically for iOS. plugin: cloud_firestore resolution: fixed A fix has been merged or is pending merge from a PR. type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests