Skip to content

MOB-2372: Upgrading SDK and refactor exports - #9

Merged
shachartransmit merged 5 commits into
mainfrom
feature/MOB-2372
Feb 23, 2026
Merged

MOB-2372: Upgrading SDK and refactor exports#9
shachartransmit merged 5 commits into
mainfrom
feature/MOB-2372

Conversation

@shachartransmit

@shachartransmit shachartransmit commented Feb 20, 2026

Copy link
Copy Markdown
Collaborator

🚀 Refactor to Named Exports - Breaking Changes

Modernizes module API by switching from mixed default/namespace exports to clean named exports following React Native best practices.

Changes:

✅ Named imports: import { initializeIOS, TSAction } from '...'
✅ Tree-shaking support
✅ Better TypeScript IntelliSense
✅ Redesigned demo app
📋 Migration guide included
Breaking: Update imports & remove module prefixes

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This pull request modernizes the module's API by transitioning from a mixed default/namespace export pattern to clean named exports, following React Native best practices. The changes also include native SDK version upgrades for both iOS and Android platforms, along with a redesigned demo application UI.

Changes:

  • Refactored module API from namespace exports (TSAccountProtectionSDK.TSAction) to direct named exports (TSAction)
  • Upgraded iOS AccountProtection SDK from 0.0.8006 to 2.2.0 and Android from 2.2.4 to 2.2.5
  • Redesigned demo app UI with modern banking interface aesthetics

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/index.tsx Removed namespace wrapper and class instance, converted to direct named exports of types and functions
react-native-ts-accountprotection.podspec Updated iOS AccountProtection dependency from 0.0.8006 to 2.2.0
android/build.gradle Updated Android AccountProtection dependency from 2.2.4 to 2.2.5
example/ios/Podfile.lock Lock file reflecting iOS dependency updates including TSCoreSDK upgrade to 1.1.2
example/src/App.tsx Updated imports to use new named export pattern
example/src/screens/login.tsx Redesigned login UI with modern banking theme and improved styling
example/src/screens/authenticated-user.tsx Redesigned authenticated user UI with account overview and improved transfer form
RELEASE_NOTES.md Added comprehensive release notes for version 0.2.0 documenting breaking changes
README.md Updated code examples to demonstrate new named export usage
MIGRATION_0.1.9-0.2.0.md Created migration guide with step-by-step instructions for updating to new API

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/index.tsx
Comment on lines +56 to +67
export const enum TSAction {
login = 'login',
register = 'register',
transaction = 'transaction',
checkout = 'checkout',
password_reset = 'password_reset',
logout = 'logout',
account_details_change = 'account_details_change',
account_auth_change = 'account_auth_change',
withdraw = 'withdraw',
credits_change = 'credits_change',
}

Copilot AI Feb 23, 2026

Copy link

Choose a reason for hiding this comment

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

Using const enum for TSAction can cause issues with tree-shaking and module boundaries in some bundlers. Since this is a public API that will be consumed by external applications, consider changing export const enum TSAction to export enum TSAction to ensure better compatibility. Const enums are inlined at compile time, which can lead to TypeScript transpilation issues when used across module boundaries, especially with isolatedModules flag enabled.

Copilot uses AI. Check for mistakes.
@@ -14,7 +14,7 @@ Pod::Spec.new do |s|
s.platforms = { :ios => min_ios_version_supported }
s.source = { :git => "https://github.com/TransmitSecurity/react-native-ts-accountprotection.git", :tag => "#{s.version}" }

Copilot AI Feb 23, 2026

Copy link

Choose a reason for hiding this comment

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

The iOS SDK is being upgraded from version 0.0.8006 to 2.2.0, which represents a major version jump (from pre-1.0 to 2.x). This significant version change should be documented in the release notes, especially if there are any breaking changes or important migration steps required at the native SDK level. Consider adding a note about the native SDK upgrade in the release notes to inform users of potential native-level changes.

Suggested change
# NOTE: The native iOS SDK dependency 'AccountProtection' has been upgraded to 2.2.0
# from a pre-1.0 version (e.g. 0.0.8006). Ensure this major native SDK change, and any
# breaking changes or migration steps, are clearly documented in the project release notes.

Copilot uses AI. Check for mistakes.
Comment thread android/build.gradle
@shachartransmit
shachartransmit merged commit aa5864d into main Feb 23, 2026
7 of 9 checks passed
@shachartransmit
shachartransmit deleted the feature/MOB-2372 branch July 24, 2026 15:21
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.

2 participants