Skip to content

Fix web restore alert missing action button#443

Merged
yusuftor merged 3 commits intodevelopfrom
fix/restore-alert
Feb 27, 2026
Merged

Fix web restore alert missing action button#443
yusuftor merged 3 commits intodevelopfrom
fix/restore-alert

Conversation

@yusuftor
Copy link
Copy Markdown
Collaborator

@yusuftor yusuftor commented Feb 27, 2026

Changes in this pull request

  • Fixed the web restore alert not showing the "Yes" action button and "Cancel" incorrectly triggering the restore action. The trailing closure was binding to onClose instead of action, so the confirm button was never created and the cancel button opened the URL.
  • Localized all web restore alert strings across 41 locales using the existing LocalizationLogic.localizedBundle() pattern.

Checklist

  • All unit tests pass.
  • All UI tests pass.
  • Demo project builds and runs on iOS.
  • Demo project builds and runs on Mac Catalyst.
  • Demo project builds and runs on visionOS.
  • I added/updated tests or detailed why my change isn't tested.
  • I added an entry to the CHANGELOG.md for any breaking changes, enhancements, or bug fixes.
  • I have run swiftlint in the main directory and fixed any issues.
  • I have updated the SDK documentation as well as the online docs.
  • I have reviewed the contributing guide

🤖 Generated with Claude Code

Greptile Summary

This PR fixes a critical bug where the web restore alert's trailing closure was binding to onClose instead of action, causing the "Yes" button to not appear and the "Cancel" button to incorrectly trigger the restore URL. The fix explicitly names the action parameter to ensure proper closure binding. Additionally, all alert strings across the SDK have been localized into 41 languages using the existing localization pattern.

Key changes:

  • Fixed Swift trailing closure ambiguity in TransactionManager.swift by explicitly naming the action: parameter
  • Localized purchase error, pending approval, and web restore alert strings across 41 locales
  • Version bump to 4.14.1 with appropriate changelog entry

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The core logic fix is straightforward and correctly addresses a Swift trailing closure binding issue. The localization additions follow the existing pattern (LocalizationLogic.localizedBundle()) used throughout the codebase. All changes are additive and non-breaking.
  • No files require special attention

Important Files Changed

Filename Overview
Sources/SuperwallKit/StoreKit/Transactions/TransactionManager.swift Fixed web restore alert bug by explicitly naming the action parameter, preventing trailing closure from binding to onClose. Localized all alert strings.
Sources/SuperwallKit/Misc/Constants.swift Version bumped from 4.14.0 to 4.14.1
CHANGELOG.md Added 4.14.1 release notes documenting the bug fix and localization enhancements
Sources/SuperwallKit/Resources/Localizations/en.lproj/Localizable.strings Added localization keys for web restore, purchase error, pending approval, and generic done button

Last reviewed commit: e79022d

Copy link
Copy Markdown

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

44 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Comment thread Examples/Advanced/Advanced.xcodeproj/project.pbxproj Outdated
@yusuftor yusuftor merged commit 76d509f into develop Feb 27, 2026
4 checks passed
@yusuftor yusuftor deleted the fix/restore-alert branch February 27, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant