Commit cf26e31
Fix iOS 26.4+ restore: defer handleRestore to allow pending transactions to arrive (#286)
* Initial plan
* Fix iOS restore: defer handleRestore to allow pending transactions to arrive
On iOS 26.4+, restoreCompletedTransactionsFinished may be called before
all restored transactions are delivered via updatedTransactions. This
caused handleRestore to be called with an empty array.
Fix by deferring the handleRestore delivery using a 500ms timer, giving
pending updatedTransactions callbacks time to process restored
transactions first.
Agent-Logs-Url: https://github.com/libgdx/gdx-pay/sessions/9dc875b1-3666-46a7-a485-0946d118e71b
Co-authored-by: keesvandieren <863966+keesvandieren@users.noreply.github.com>
* Add rationale comment for 500ms timer delay
Agent-Logs-Url: https://github.com/libgdx/gdx-pay/sessions/9dc875b1-3666-46a7-a485-0946d118e71b
Co-authored-by: keesvandieren <863966+keesvandieren@users.noreply.github.com>
* Switch from NSTimer to libGDX Timer for restore deferral
Replaces the iOS-specific NSTimer (which didn't compile) with
com.badlogic.gdx.utils.Timer, matching the approach suggested
in issue #285.
Agent-Logs-Url: https://github.com/libgdx/gdx-pay/sessions/042d60fa-727f-43f6-bef1-8e8002016b3b
Co-authored-by: keesvandieren <863966+keesvandieren@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: keesvandieren <863966+keesvandieren@users.noreply.github.com>1 parent 3092154 commit cf26e31
1 file changed
Lines changed: 28 additions & 3 deletions
File tree
- gdx-pay-iosrobovm-apple/src/main/java/com/badlogic/gdx/pay/ios/apple
Lines changed: 28 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| |||
107 | 109 | | |
108 | 110 | | |
109 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
110 | 115 | | |
111 | 116 | | |
112 | 117 | | |
| |||
151 | 156 | | |
152 | 157 | | |
153 | 158 | | |
| 159 | + | |
| 160 | + | |
154 | 161 | | |
155 | 162 | | |
156 | 163 | | |
| |||
483 | 490 | | |
484 | 491 | | |
485 | 492 | | |
486 | | - | |
487 | 493 | | |
488 | 494 | | |
489 | | - | |
490 | | - | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
491 | 508 | | |
492 | 509 | | |
493 | 510 | | |
494 | 511 | | |
495 | 512 | | |
| 513 | + | |
496 | 514 | | |
497 | 515 | | |
498 | 516 | | |
| |||
505 | 523 | | |
506 | 524 | | |
507 | 525 | | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
508 | 533 | | |
509 | 534 | | |
510 | 535 | | |
| |||
0 commit comments