From c0f21426e31e80b34b26abd164a7ef236df8204d Mon Sep 17 00:00:00 2001 From: dianaKhortiuk-frontegg Date: Wed, 22 Jul 2026 14:02:31 +0300 Subject: [PATCH] fix(capacitor): resolve initWithRegion on iOS so the promise no longer hangs (FR-25945) ios/Plugin/FronteggNativePlugin.swift initWithRegion() called fronteggApp.initWithRegion(...) but never called call.resolve(), so the JS promise from FronteggService.initWithRegion hung forever on iOS (Android already resolves). Any await-based region-selection flow (e.g. the example's region.guard.ts) stalled. Resolve the call after initWithRegion. --- ios/Plugin/FronteggNativePlugin.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ios/Plugin/FronteggNativePlugin.swift b/ios/Plugin/FronteggNativePlugin.swift index a8c71c8..ea89807 100644 --- a/ios/Plugin/FronteggNativePlugin.swift +++ b/ios/Plugin/FronteggNativePlugin.swift @@ -238,6 +238,9 @@ public class FronteggNativePlugin: CAPPlugin { } fronteggApp.initWithRegion(regionKey: regionKey) + // FR-25945: the JS promise from initWithRegion hung forever on iOS because we never + // resolved the call (Android already resolves). Resolve so await-based region flows proceed. + call.resolve() } @objc func refreshToken(_ call: CAPPluginCall) {