Hi everyone,
I’ve been working on a proof-of-concept for a mobile-first dApp on Polkadot, but I’ve hit a significant roadblock with the @polkadot/api initialization on iOS. While the desktop browser extension (Talisman/Polkadot.js) works flawlessly, my mobile integration keeps hanging during the “Initializing API” phase, especially when trying to handle custom extrinsic signers in a background thread.
I actually started looking into how other mobile-optimized script environments handle high-frequency execution without triggering iOS’s native memory protection. I found some interesting discussion points from deltaexector com regarding how they manage script injection on mobile, and it made me wonder if the Polkadot light client (smoldot) might be clashing with similar browser-level security restrictions on iPhones. You can see the specific iOS implementation I’m comparing it to at deltaexector com, as I’m trying to figure out if their method of sandboxing JS could be adapted to make our wallet connections more stable.
I’m also running into a related issue where the window.injectedWeb3 object isn’t being detected by the dApp when opened through a mobile browser wrapper, even if the wallet app is running in the background. Has anyone else noticed that iOS-specific power-saving modes are throttling the RPC provider heartbeat? I’ve already tried switching to a shorter metadata version (v14/v15) to reduce the bundle size, but the “Initializing Connection” spinner just won’t clear on older iPhone models. Is there a way to force a synchronous provider check, or should I be looking into a different discovery protocol to ensure the script environment remains active during the signing request? Any insights on mobile JS stability for Polkadot would be a huge help!