Conversation
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
| } | ||
| } | ||
|
|
||
| fun ReaderInfo.FirmwareUpdateStatus.toPercent() : Int? { |
There was a problem hiding this comment.
nit: extra whitespace after fun and the padding on the method is off
| { | ||
| "name": "mobile-payments-sdk-react-native", | ||
| "version": "2026.3.4", | ||
| "version": "2026.4.1", |
There was a problem hiding this comment.
Add a new entry to the https://github.com/square/mobile-payments-sdk-react-native/blob/main/CHANGELOG.md
There was a problem hiding this comment.
I added new line in changelog
rbeiter-block
left a comment
There was a problem hiding this comment.
Looks good on the iOS side - validated the new podspec hashes reference the correct podspecs.
| RNScreens: 35bb8e81aeccf111baa0ea01a54231390dbbcfd9 | ||
| RNVectorIcons: 182892e7d1a2f27b52d3c627eca5d2665a22ee28 | ||
| SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d | ||
| SquareMobilePaymentsSDK: 53cd315a537037377cd364edc874bf75782239eb |
There was a problem hiding this comment.
Validated these hashes - they are the sha1sum of the podspec:
$ # For local/path pods, CocoaPods uses Specification#checksum which does:
# Digest::SHA1.hexdigest(File.read(defined_in_file))
echo "=== Trunk pod verification ==="
echo "SquareMobilePaymentsSDK 2.5.0:"
echo " Podfile.lock says: 61d783cb2ef4b238731f4433a42028d95c77893c"
echo " pod spec cat hash: $(pod spec cat SquareMobilePaymentsSDK --version=2.5.0 2>/dev/null | shasum -a 1 | awk '{print
$1}')"
echo ""
echo "MockReaderUI 2.5.0:"
echo " Podfile.lock says: 651252bf60bffc2699866448a6fb7250c06be785"
echo " pod spec cat hash: $(pod spec cat MockReaderUI --version=2.5.0 2>/dev/null | shasum -a 1 | awk '{print $1}')"
=== Trunk pod verification ===
SquareMobilePaymentsSDK 2.5.0:
Podfile.lock says: 61d783cb2ef4b238731f4433a42028d95c77893c
pod spec cat hash: 61d783cb2ef4b238731f4433a42028d95c77893c
MockReaderUI 2.5.0:
Podfile.lock says: 651252bf60bffc2699866448a6fb7250c06be785
pod spec cat hash: 651252bf60bffc2699866448a6fb7250c06be785| @@ -1,5 +1,9 @@ | |||
| ## Changelog | |||
|
|
|||
| ### v2026.4.1 Apr 1, 2026 | |||
There was a problem hiding this comment.
Date is wrong, should be Apr 22, 2026
There was a problem hiding this comment.
Fixed, i update date
|
|
||
| ### v2026.4.1 Apr 1, 2026 | ||
|
|
||
| * Upgrade Android and iOS SDK to 2.5.0 |
There was a problem hiding this comment.
Can you please expand the changelog enty? A single line doesn't capture what actually ships in this PR - the native SDK bump is only part of it. New public APIs (isShowingSettings, closeSettings, readerSettings) and breaking changes to ReaderInfo and the Android Card.Brand mapping should all be called out so integrators know what to update. Something like:
* Upgrade Android and iOS native SDK to `2.5.0`
* Add `SettingsManager.isShowingSettings()` to check whether the Settings screen is currently presented
* Add `SettingsManager.closeSettings()` to programmatically dismiss the Settings screen
* Add `ReaderManager.readerSettings()` which returns a new `ReaderSettings` object (`isReducedChargingModeEnabled`, `preferredFirmwareUpdateTime`). Adds a new `TimeOfDay` type (`hour`, `minute`) used by `preferredFirmwareUpdateTime`
* **Breaking:** `ReaderInfo.firmwareVersion` and `ReaderInfo.firmwarePercent` have been replaced by a single `ReaderInfo.firmwareInfo` object of shape `{ version, updatePercentage }`, mirroring the 2.5.0 native API
* **Breaking (Android):** Removed `ALIPAY`, `CASH_APP`, `SUICA`, `ID`, and `QUICPAY` from the mapped `Card.Brand` values — these were removed in native SDK `2.5.0`
There was a problem hiding this comment.
Done, im using your suggested entry, this is a good and complete summary
| // --- | ||
|
|
||
| @ReactMethod | ||
| private fun readerSettings(promise: Promise) { |
There was a problem hiding this comment.
Why is it private? It should be a public method
There was a problem hiding this comment.
fixed, now all are public
| func closeSettings(resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) { | ||
| DispatchQueue.main.async { | ||
| let settingsManager = self.mobilePaymentsSDK.settingsManager | ||
| resolve(settingsManager.dismissSettings()) |
There was a problem hiding this comment.
There's a subtle mismatch in Android/iOS APIs:
- Android's
closeSettings()returnstrue/falsebased of whether the settings screen got closed or not - iOS's
dismissSettings()returnsVoid
In TypeScript the closeSettings is defined as Promise<boolean>. But if we call esolve(settingsManager.dismissSettings()) here it will make it resolve as nil/undefined, not a Boolean. We should just always resolve as true for iOS to keep the returned promise consistent. I believe it should be like this:
let settingsManager = self.mobilePaymentsSDK.settingsManager
settingsManager.dismissSettings()
resolve(true)

upgrade to last native version 2.5.0