Hey everyone,
I’m currently working on a mobile-first DApp integration using the MetaMask SDK, and I’ve run into a persistent performance issue on iOS that I’m struggling to debug. Whenever my application triggers a signature request or initiates a background data sync through the SDK, the interface occasionally hangs for several seconds. It seems like the handshake between the browser and the wallet is causing a main-thread block, which results in a “dead” UI where the user can’t even cancel the transaction until the process clears.
I’ve already looked into our memory management and optimized the provider calls, but the “micro-stutters” are still there during peak execution. I even went through a clean https://deltaexector.com/ios/ setup for my execution components to see if a more isolated script handler would prevent the browser from stalling, but I’m still seeing these intermittent timeouts where the transaction pop-up just doesn’t trigger in time.
Has anyone else here dealt with execution lag when running high-frequency script calls alongside the SDK on mobile? I’m curious if there’s a specific way to handle these background task priorities to keep the UI responsive, or if I should be looking into a different bridge configuration for better stability during the injection process. I’d really appreciate any insights or shared experiences on how to smoothen the execution flow so the user experience doesn’t feel so fragmented!
Thanks — this sounds like a main-thread/blocking issue during the wallet handshake on iOS. I searched our knowledge base (Embedded Wallets / Web3Auth docs) and didn’t find a platform-specific doc that directly addresses intermittent UI hangs during signature handshakes, so here are focused steps to triage and quick mitigations:
Immediate actions (try these first)
Only trigger signature/transaction popups from explicit user gestures; avoid firing from background syncs.
Throttle/queue/debounce rapid provider calls so the communication bridge isn’t overwhelmed.
Move heavy processing off the UI/JS main thread: use Web Workers (web) or native background threads/worker threads (iOS / React Native native modules).
If using a WebView/React Native: prefer WKWebView, ensure heavy JS isn’t executed on the JS/UI thread, and avoid synchronous postMessage handlers.
Enable SDK debug logging to capture handshake latency and inspect serialization/round-trips.
Diagnostic steps (recommended)
Reproduce while connected to Safari Web Inspector (or Xcode console) and capture the JS stack and console logs when the freeze happens.
Run Instruments (Time Profiler/Main Thread) on device to see what is blocking the main thread during the freeze.
Test against the official MetaMask SDK sample app to isolate whether it’s the SDK bridge or your app logic.
What I need from you to continue triage
SDK + package name (MetaMask SDK / MetaMask Connect) and exact SDK version
Framework: native iOS (Swift/Obj-C) or React Native / other hybrid
iOS version(s) and device model where this reproduces
Minimal code snippet that triggers the signature or a short repro flow
Safari/Web Inspector console screenshot, Xcode console logs, or Instruments trace if available
If you can share those, I’ll triage and propose targeted fixes. If you’d rather not dig into profiling now, I’ll escalate to an engineer to investigate further — just say so.
Note: This response was generated by an AI bot and may require further verification. The MetaMask Community Team has tracked this issue and will be responding as soon as possible.
Additionally, we would recommend you to join our monthly Office Hours to discuss this with our engineering team. MetaMask Developer Office Hours