·
27 commits
to main
since this release
Fixed
- iOS
readInPlace/readInPlaceBytesnow marshal the post-download continuation back onto the main actor before invokingreadInPlaceDocument/readInPlaceBinaryDocument. The2.1.0async rewrite ofwaitForDownloadCompletioninadvertently removed theDispatchQueue.mainhop that the callback-based waiter guaranteed, lettingUIDocument.open(completionHandler:)be called from the Swift cooperative pool. This restores the1.2.2invariant thatUIDocumentwork runs under the main queue per Apple's completion-handler contract and avoids the_os_object_retain"Resurrection of an object" crash that motivated that fix. - macOS
uploadFile,readInPlace,readInPlaceBytes,writeInPlace,writeInPlaceBytesnow run theirTaskbodies on the main actor. Because the macOSFlutterMethodChannelis registered without a background task queue,FlutterResultmust be invoked on the main thread; the previousTask { [self] in ... }blocks resumed on the cooperative pool afterawait, causingresult(...)to be called off-main in preflight error paths.
Closes the threading concerns raised on #27, #26, and #25.
Full Changelog: 2.1.1...2.1.2