Migration Guide

This guide covers all the changes needed to upgrade from ReadyRemitSDK (v10) to PayMittoSDK (v11). The update involves replacing the package dependency, updating the module import, and renaming a small set of SDK symbols.

Package Dependency

Swift Package Manager

Via Package.swift — replace the existing package reference with the new URL and version:

.package(
    url: "https://github.com/PayMitto/paymitto-ios.git",
    .exact("11.0.0")
)

Also update the target dependency:

.product(name: "PayMittoSDK", package: "paymitto-ios")

Via Xcode UI — if you manage SPM packages through Xcode instead:

  1. Open your .xcodeproj in Xcode.
  2. Go to your project settings → Package Dependencies.
  3. Remove the ReadyRemitSDK entry (listed as readyremit-sdk-ios).
  4. Add a new package: https://github.com/PayMitto/paymitto-ios.git
  5. Select Exact Version 11.0.0.
  6. Link PayMittoSDK to your target.

CocoaPods

Add the PayMitto specs source and the new pod to your Podfile:

pod 'PayMittoSDK', :git => 'https://github.com/PayMitto/paymitto-ios.git', :tag => '11.0.0'

Then run:

pod install

Import

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

import ReadyRemitSDK
import PayMittoSDK

SDK Entry Point

The singleton accessor has been renamed:

ReadyRemit.shared.startSDK(
    configuration: .init(environment: .sandbox),
    fetchAccessTokenDetails: fetchAccessTokenDetails,
    verifyFundsAndCreateTransfer: verifyFundsAndCreateTransfer,
    onDismiss: { ... }
) { sdkView in ... }
PayMitto.shared.startSDK(
    configuration: .init(environment: .sandbox),
    fetchAccessTokenDetails: fetchAccessTokenDetails,
    verifyFundsAndCreateTransfer: verifyFundsAndCreateTransfer,
    onDismiss: { ... }
) { sdkView in ... }

Error Type

Update throw and catch sites:

throw ReadyRemitError(code: .none, message: "Something went wrong")

} catch let error as ReadyRemitError {
    throw error
}
throw PayMittoError(code: .none, message: "Something went wrong")

} catch let error as PayMittoError {
    throw error
}

Update typed throws signatures as well:

func verifyFundsAndCreateTransfer(...) async throws(ReadyRemitError) -> TransferDetails
func verifyFundsAndCreateTransfer(...) async throws(PayMittoError) -> TransferDetails

Renamed Symbols

OldNew
ReadyRemitSDK (module)PayMittoSDK
ReadyRemit.sharedPayMitto.shared
ReadyRemitErrorPayMittoError
ReadyRemitConfigurationPayMittoConfiguration
ReadyRemitEnvironmentPayMittoEnvironment