Migration Guide

Package Installation

Remove the old package and install the new one:

npm install react-native-paymitto-sdk
# or
yarn add react-native-paymitto-sdk
npm uninstall react-native-paymitto-sdk
npm install react-native-paymitto-sdk-11.0.0.tgz
# or
yarn remove react-native-paymitto-sdk
yarn add file:react-native-paymitto-sdk-11.0.0.tgz

The package name changed from react-native-paymitto-sdk to react-native-paymitto-sdk.


Expo Plugin

If you are using Expo, update the plugin reference in your app.json or app.config.js:

{
  "plugins": [
    "react-native-paymitto-sdk/plugin/with-paymitto-sdk"
  ]
}
{
  "plugins": [
    "react-native-paymitto-sdk/plugin/with-paymitto-sdk"
  ]
}

iOS Podfile

Update the require_relative and embed helper in your ios/Podfile:

require_relative '../node_modules/react-native-ready-remit-sdk/ios/embed_readyremit'

post_install do |installer|
  embed_readyremit_framework!(installer)
end
require_relative '../node_modules/react-native-paymitto-sdk/ios/embed_paymitto'

post_install do |installer|
  embed_paymitto_framework!(installer)
end

Then re-install pods:

cd ios && pod install

Imports

Replace the import in every file that used the old SDK:

import { startSDK, type PayMittoConfiguration } from 'react-native-paymitto-sdk'
import { startSDK, type PayMittoConfiguration } from 'react-native-paymitto-sdk'

The startSDK function name is unchanged.


Renamed Symbols

OldNew
Package react-native-paymitto-sdkreact-native-paymitto-sdk
PayMittoConfigurationPayMittoConfiguration
PayMittoEnvironmentPayMittoEnvironment
PayMittoLocalizationPayMittoLocalization
PayMittoSupportedAppearancePayMittoSupportedAppearance
PayMittoTransferMethodPayMittoTransferMethod
PayMittoRemittanceServiceProviderPayMittoRemittanceServiceProvider
PayMittoSourceAccountPayMittoSourceAccount
PayMittoTokenResponsePayMittoTokenResponse
PayMittoTransferRequestPayMittoTransferRequest
PayMittoTransferResponsePayMittoTransferResponse
PayMittoErrorPayMittoError
PayMittoSDKEventPayMittoSDKEvent
Expo plugin with-paymitto-sdkwith-paymitto-sdk
iOS embed embed_paymitto_framework!embed_paymitto_framework!