Commit f37cc10
fix: add defensive timeout to iOS initialize to prevent promise hang (SDK-392)
On React Native New Architecture (bridgeless mode), the IterableAPI.initialize2
callback may never fire if auth token retry is exhausted in the native SDK,
leaving the JS promise pending indefinitely. This adds a 10-second timeout
that resolves the promise if the native callback is not invoked in time.
The SDK still initializes and functions normally — the timeout only unblocks
the JS promise so downstream app logic (e.g. iterableReady) is not stalled.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent e69c305 commit f37cc10
1 file changed
Lines changed: 20 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
645 | 645 | | |
646 | 646 | | |
647 | 647 | | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
648 | 664 | | |
649 | 665 | | |
650 | 666 | | |
651 | 667 | | |
652 | 668 | | |
653 | 669 | | |
654 | | - | |
| 670 | + | |
| 671 | + | |
655 | 672 | | |
656 | 673 | | |
657 | 674 | | |
658 | | - | |
| 675 | + | |
659 | 676 | | |
660 | 677 | | |
661 | 678 | | |
662 | | - | |
| 679 | + | |
663 | 680 | | |
664 | 681 | | |
665 | 682 | | |
| |||
0 commit comments