Skip to content

upgrade to 2.5.0 native sdk#98

Open
cesar-sosa-hol wants to merge 4 commits intomainfrom
upgrade-to-native-sdk-to-2.5.0
Open

upgrade to 2.5.0 native sdk#98
cesar-sosa-hol wants to merge 4 commits intomainfrom
upgrade-to-native-sdk-to-2.5.0

Conversation

@cesar-sosa-hol
Copy link
Copy Markdown
Collaborator

upgrade to last native version 2.5.0

@github-advanced-security
Copy link
Copy Markdown

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:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

}
}

fun ReaderInfo.FirmwareUpdateStatus.toPercent() : Int? {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: extra whitespace after fun and the padding on the method is off

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

Comment thread package.json
{
"name": "mobile-payments-sdk-react-native",
"version": "2026.3.4",
"version": "2026.4.1",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I added new line in changelog

@cesar-sosa-hol cesar-sosa-hol requested a review from Armaxis April 21, 2026 20:08
Copy link
Copy Markdown

@rbeiter-block rbeiter-block left a comment

Choose a reason for hiding this comment

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

Looks good on the iOS side - validated the new podspec hashes reference the correct podspecs.

Comment thread example/ios/Podfile.lock
RNScreens: 35bb8e81aeccf111baa0ea01a54231390dbbcfd9
RNVectorIcons: 182892e7d1a2f27b52d3c627eca5d2665a22ee28
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
SquareMobilePaymentsSDK: 53cd315a537037377cd364edc874bf75782239eb
Copy link
Copy Markdown

@rbeiter-block rbeiter-block Apr 21, 2026

Choose a reason for hiding this comment

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

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

Comment thread CHANGELOG.md Outdated
@@ -1,5 +1,9 @@
## Changelog

### v2026.4.1 Apr 1, 2026
Copy link
Copy Markdown
Member

@Armaxis Armaxis Apr 22, 2026

Choose a reason for hiding this comment

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

Date is wrong, should be Apr 22, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed, i update date

Comment thread CHANGELOG.md Outdated

### v2026.4.1 Apr 1, 2026

* Upgrade Android and iOS SDK to 2.5.0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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`

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done, im using your suggested entry, this is a good and complete summary

// ---

@ReactMethod
private fun readerSettings(promise: Promise) {
Copy link
Copy Markdown
Member

@Armaxis Armaxis Apr 22, 2026

Choose a reason for hiding this comment

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

Why is it private? It should be a public method

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

fixed, now all are public

func closeSettings(resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
DispatchQueue.main.async {
let settingsManager = self.mobilePaymentsSDK.settingsManager
resolve(settingsManager.dismissSettings())
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's a subtle mismatch in Android/iOS APIs:

  • Android's closeSettings() returns true/false based of whether the settings screen got closed or not
  • iOS's dismissSettings() returns Void

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)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

after review details in iOS last version dismissSettings() return Boolean
image

Comment thread android/src/main/java/com/mobilepaymentssdkreactnative/Utils.kt
@cesar-sosa-hol cesar-sosa-hol requested a review from Armaxis April 23, 2026 13:50
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.

4 participants