From fb3a97b4081b8133feb9a318a62ba1d82c8fdc6b Mon Sep 17 00:00:00 2001 From: Nils Pukropp Date: Tue, 13 Oct 2026 18:37:47 +0200 Subject: [PATCH] fix(ios): await the engine before stopping a crawl NativeRuntime.engine() is async and throws on iOS, so the bare call in stopCrawl failed the simulator build. Run it in a Task, as Android runs it in a coroutine. --- ios/ProtonStream/App/AppModel.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/ProtonStream/App/AppModel.swift b/ios/ProtonStream/App/AppModel.swift index 7d52a9f..f31e5de 100644 --- a/ios/ProtonStream/App/AppModel.swift +++ b/ios/ProtonStream/App/AppModel.swift @@ -166,7 +166,7 @@ final class AppModel { /// the one being read keeps what it had. func stopCrawl() { crawlStopped = true - NativeRuntime.engine().stopCrawl() + Task { try? await NativeRuntime.engine().stopCrawl() } } /// The crawl itself, for pull to refresh, which holds its spinner until