Closed crtl closed 2 years ago
Any updates on this issue? I have been having this for more than a month now and I have just commented out FirebaseFirestore
to get it working. But build times are 45+ mins :(
Sorry @sathishgovindarajuworks (and @crtl ) I've been traveling so haven't had time to look personally. And no one else has volunteered their time, so no triage has been done.
So, no updates no (in general open source means you get what you see: there are no hidden updates, either way)
Mostly commenting to say that a proper implementation of https://ccache.dev/ will work around slow compilation for you quite effectively. In CI with firestore compiling I see compilation times of just a few minutes typically. Here's a whole recipe for you using https://github.com/hendrikmuhs/ccache-action - https://github.com/invertase/react-native-firebase/blob/main/.github/workflows/tests_e2e_ios.yml
note especially
these to make sure Xcode is cached effectively
and then these instructions (which are about the same between flutter and react-native) to get Xcode to use ccache https://reactnative.dev/docs/build-speed#xcode-specific-setup
I had a chance to scan this just a little more - I wonder if your flutter project needs to change it's ios deployment target to 9+
In the Xcode trace you should remove all warnings and notes, and focus just on the errors. They are here
In file included from /Users/user/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.3/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:8:
/Users/user/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.3/ios/Classes/Private/FLTFirebaseFirestoreUtils.h:43:4: error: expected a type
+ (FIRFirestoreSource)FIRFirestoreSourceFromArguments:(NSDictionary *_Nonnull)arguments;
^
/Users/user/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.3/ios/Classes/Private/FLTFirebaseFirestoreUtils.h:45:4: error: expected a type
+ (FIRFirestore *_Nullable)getCachedFIRFirestoreInstanceForKey:(NSString *_Nonnull)key;
^
/Users/user/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.3/ios/Classes/Private/FLTFirebaseFirestoreUtils.h:46:40: error: expected a type
+ (void)setCachedFIRFirestoreInstance:(FIRFirestore *_Nonnull)firestore
^
/Users/user/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.3/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:12:33: error: no type or protocol named 'FIRListenerRegistration'
@property(readwrite, strong) id<FIRListenerRegistration> listenerRegistration;
^
/Users/user/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.3/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:19:3: error: use of undeclared identifier 'FIRFirestore'
FIRFirestore *firestore = arguments[@"firestore"];
^
/Users/user/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.3/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:19:17: error: use of undeclared identifier 'firestore'
FIRFirestore *firestore = arguments[@"firestore"];
^
/Users/user/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.3/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:27:32: error: use of undeclared identifier 'firestore'
self.listenerRegistration = [firestore addSnapshotsInSyncListener:listener];
^
/Users/user/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-3.4.3/ios/Classes/FLTSnapshotsInSyncStreamHandler.m:33:30: error: no known instance method for selector 'remove'
[self.listenerRegistration remove];
^~~~~~
8 errors generated.
Looks to me like some sort of huge issue with imports/includes. That usually implies an easy fix (huge things are usually an obvious simple thing like one missing import statement) but I could be wrong. I would need to see the steps you can take to create a project with this problem
Or 10+ for recent versions.
Hello, someone has found a solution for this issue there: https://github.com/firebase/flutterfire/issues/9015#issuecomment-1193825846
@paulb777 - @kevin-trancoso5 has pointed to a comment that is I think the correct root cause analysis
I missed this PR / changelog note where you bumped the minimum versions for zip distribution https://github.com/firebase/firebase-ios-sdk/pull/9633 / https://firebase.google.com/support/release-notes/ios#zip_and_carthage_users
Apologies everyone!
From @szotp-lc
The problem is occuring because:
invertase library no longer includes arm7v binaries (8.15 still had them), cloud_firestore still technically supports [iOS 10] (https://github.com/firebase/flutterfire/blob/master/packages/cloud_firestore/cloud_firestore/ios/cloud_firestore.podspec#L32). iOS 10 is the last version that supports iPhone 5c (32 bit / arm7v device) Cocoapods wants to build iOS 10, sees there is no arm7v for some dependencies, and derps-out. Although it's technically problem of invertase, it would make a lot of sense to raise the deployment target in this repo to iOS 11.
I will bump minimum versions supported here from 10 to 11 corresponding to this change. If people still need to support 10, they'll have to use the cocoapods distribution and accelerate another way (ccache is my favorite)
Good catch @mikehardy. Also https://github.com/firebase/firebase-ios-sdk is planning to update to iOS 11 in the next major version, largely because Xcode 14 is doing so.
Given that the zip builder has already changed to iOS 11, agreed that the invertase podspecs should change now.
For everyone that is affected by this, you might try the tag '9.5.0-1' here to see if it helps you.
You will need an iOS minimum deployment target of 11 set in your Podfile and your app info via Xcode to avoid other problems I think
Assuming this works, it's a closed issue and the next release will auto-magically incorporate the change :crossed_fingers:
After adding the specified pod to my Podfile I am no longer able to build the app and it fails with below output. This only happens after ive added the documented pod to my podfile and run pod install. Ive also tried to remove Podfile.lock and rerun
pod install
but it has no effect. If I removepod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '9.3.0'
from Podfile it works again.Im not experienced with iOS development so I did not know how to exactly title this issue.
Flutter pubspec.yaml:
Podfile:
Output: