File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed
Example/Tests/Integration/API Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 1
1
# Unreleased
2
2
3
+ # v1.16.2
4
+ - [ fixed] Fixed a configuration issue where listeners were no longer being
5
+ called back on the main thread by default.
6
+
3
7
# v1.16.1
4
8
- [ fixed] Removed a delay that may have prevented Firestore from immediately
5
9
establishing a network connection if a connectivity change occurred while
Original file line number Diff line number Diff line change @@ -1493,6 +1493,15 @@ - (void)testListenerCallbackBlocksRemove {
1493
1493
// `ListenerRegistration::Remove()` and expect to be able to immediately delete that state. The
1494
1494
// trouble is that there may be a callback in progress against that listener so the implementation
1495
1495
// now blocks the remove call until the callback is complete.
1496
+ //
1497
+ // To make this work, user callbacks can't be on the main thread because the main thread is
1498
+ // blocked waiting for the test to complete (that is, you can't await expectations on the main
1499
+ // thread and then have the user callback additionally await expectations).
1500
+ dispatch_queue_t userQueue = dispatch_queue_create (" firestore.test.user" , DISPATCH_QUEUE_SERIAL);
1501
+ FIRFirestoreSettings *settings = self.db .settings ;
1502
+ settings.dispatchQueue = userQueue;
1503
+ self.db .settings = settings;
1504
+
1496
1505
XCTestExpectation *running = [self expectationWithDescription: @" listener running" ];
1497
1506
XCTestExpectation *allowCompletion =
1498
1507
[self expectationWithDescription: @" allow listener to complete" ];
Original file line number Diff line number Diff line change 42
42
#include " Firestore/core/src/core/transaction.h"
43
43
#include " Firestore/core/src/model/database_id.h"
44
44
#include " Firestore/core/src/util/async_queue.h"
45
+ #include " Firestore/core/src/util/config.h"
45
46
#include " Firestore/core/src/util/empty.h"
46
47
#include " Firestore/core/src/util/error_apple.h"
47
48
#include " Firestore/core/src/util/exception.h"
You can’t perform that action at this time.
0 commit comments