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 11# Unreleased
22
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+
37# v1.16.1
48- [ fixed] Removed a delay that may have prevented Firestore from immediately
59 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 {
14931493 // `ListenerRegistration::Remove()` and expect to be able to immediately delete that state. The
14941494 // trouble is that there may be a callback in progress against that listener so the implementation
14951495 // 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+
14961505 XCTestExpectation *running = [self expectationWithDescription: @" listener running" ];
14971506 XCTestExpectation *allowCompletion =
14981507 [self expectationWithDescription: @" allow listener to complete" ];
Original file line number Diff line number Diff line change 4242#include " Firestore/core/src/core/transaction.h"
4343#include " Firestore/core/src/model/database_id.h"
4444#include " Firestore/core/src/util/async_queue.h"
45+ #include " Firestore/core/src/util/config.h"
4546#include " Firestore/core/src/util/empty.h"
4647#include " Firestore/core/src/util/error_apple.h"
4748#include " Firestore/core/src/util/exception.h"
You can’t perform that action at this time.
0 commit comments