# iOS SDK - Changelog

All notable changes to the Glomo iOS SDK.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). From 1.0.0 the public API follows [Semantic Versioning](https://semver.org/) - breaking public API changes require a new major release.

## [1.0.0] - 2026-10-01

The first stable release. The public contract is aligned with the Flutter and Android SDKs.

### Breaking

- **Minimum supported iOS is now 16.0**, and distribution is Swift Package Manager only. CocoaPods support is removed.
- **`onUserJourneyCompleted` is a new required callback** with no protocol-extension default, so every integration must implement it. Required on purpose: the order decides server-side whether bank transfers are enabled, so a default body would let a host upgrade, keep compiling, and silently stop hearing about a journey it used to be told about.
- **`payment.bank_transfer_submitted` no longer reaches `onPaymentSuccess`.** Hosts that fulfil orders from `onPaymentSuccess` were being told a payment had completed when no money had moved. It now arrives at `onUserJourneyCompleted` with a `GlomoPayUserJourneyPayload`.
- **`GlomoPayListener.onEvent` is removed**, along with its protocol-extension default. It was never part of the integration contract; everything with diagnostic value moved to the SDK's own telemetry, which is sanitised and does not depend on a host implementing anything.
- **`autoCloseOnConnectionError` moved onto `GlomoPayConfig`.** It was a property on the checkout view controller, which `startCheckout` constructs internally and never exposes, so no merchant integrating from the documentation could reach it.
- **`startCheckout` now returns a `GlomoPayCheckoutHandle`.** Retain it to dismiss that session with `close()`; the listener then receives `onPaymentTerminate(.programmatic)` once.
- **`CheckoutStatus`, `TerminationSource.backButton` and `GlomoPayResult` are removed** from the public surface. `backButton` has no meaning on iOS: the escapes are the navigation bar's Close button and interactive sheet dismissal, both reported as `userDismiss`.


### Added

- `GlomoPayUserJourneyPayload` and `GlomoPayUserJourneyType`, carrying the journey type, order ID, sender account number, transaction reference, status and raw response. Journey fields are read in both camelCase and snake_case; a payload with no `orderId` is rejected rather than delivered.
- A 15-second advisory render timeout. There was previously no timeout of any kind behind the loading state, so a page that never rendered left the user on a spinner with no error, no retry and no callback. It reports `onConnectionError` with `shouldAutoClose` false and shows a retry surface.
- The LRS education carousel above the bank page, with the same proportions as the Flutter SDK. It appears only when the checkout page signals it has content, matching the React Native SDK; silence leaves it hidden.
- `Validator.isValidUrl`, gating every URL the page asks to open. `URL(string:)` is a parse, not a check, so `javascript:`, `data:` and `file:` URLs from the page were becoming navigations.
- A `window.opener` stub in the flow injection, so bank pages that report results through `opener.postMessage` are heard instead of completing at the bank silently.
- Every user-facing string moved into a `GlomoPayLocalizable` table a host can override, and the bank-flow error path gained a real surface with retry and cancel controls. The main error panel gained a Cancel button.


### Changed

- **The `sentry-cocoa` dependency is removed.** Swift Package Manager resolves one version of a package for the whole app, so any merchant on a different Sentry version could not install this SDK at all. SDK error reporting now sends its envelopes over `URLSession` with the same content. No public API change, and a host can use any Sentry version alongside the SDK, or none.
- **`onPaymentFailure` is delivered on the checkout's failure event** instead of requiring a signature that a failure payload has never carried. The callback previously could not fire for a backend-confirmed decline in any build, and the host received an SDK error describing the SDK's own guard instead.
- **Order-fetch failure terminates the checkout and reports the cause** instead of resolving to standard and opening the standard checkout, which routed LRS orders to the wrong host. A timeout or transport failure reports through `onConnectionError`; a non-2xx status or an unparseable response through `onSdkError`.
- API error cases now travel to the caller instead of being flattened into a single network error, and no case carries the response body any more.
- The checkout's web views share one non-persistent website data store instead of the app-wide default, which was never cleared: checkout cookies, local storage and cache were persisting into the merchant application's own web views and into the next checkout.
- Every host callback goes through one delivery point on the main queue. The listener is weak, which previously meant a host passing an object it did not otherwise retain got no callbacks and no signal at all; a released listener is now recorded in diagnostics. The retention contract is documented at the `startCheckout` call site.
- `shouldAutoClose` is decided from the mapped error type instead of the sign of the error code. Every `NSURLErrorDomain` code is negative and every `WKErrorDomain` code is positive, so the old rule closed on all unmapped iOS errors and exempted genuine WebKit failures.
- Pay via Bank is not supported on the iOS SDK, matching the Flutter SDK. There is no journey member for it and no event behind it. See [Pay via Bank](/payin/payment-methods/pay-via-bank) for that method's current availability.


### Fixed

- Back in the bank overlay always closes the overlay instead of walking the bank page's history, which made the exit unreachable once a redirect chain left history behind. Edge-swipe history gestures are disabled on both web views.
- The bank flow overlay allows only `http`, `https`, `about`, `blob` and `data` navigations. WebKit never hands an unknown scheme to the system, so such a navigation previously failed silently and left the user on a bank page that appeared to have done nothing.
- A cancelled navigation is no longer reported as a connection error. WebKit delivers those routinely for superseded loads, client-side redirects and explicit stops, and with auto-close it terminated live checkouts for a non-event.
- Removed a duplicate dependency-load-failure handler that tracked the same failure twice for one message. The page's failure keeps the page's own name.


### Removed

- The SDK's own document picker. WebKit's upload sheet offers Camera, Photo Library and Files on every supported iOS version, and the SDK's replacement removed those capture options on iOS 18.4 and later - on KYC fields where photographing a document is the common case. Hosts must declare `NSCameraUsageDescription` and `NSPhotoLibraryUsageDescription`, because WebKit presents those options from the merchant application's process.


Part of the [v1 documentation](/platform/sdk/ios-sdk/v1).

## [0.0.1] - 2026-08-01

Initial pre-stable release. Not covered by the Semantic Versioning guarantee that starts at 1.0.0.

### Added

- Initial native Swift SDK package for iOS 15 and later, distributed through both Swift Package Manager and CocoaPods.
- Typed checkout configuration, payload, result, error, and listener contracts.
- Native modal `WKWebView` checkout with loading, retry, navigation, and cancellation handling.
- Standard and LRS checkout support with automatic order-based detection.
- JavaScript bridge and payment event routing aligned with the Flutter SDK.
- Device compliance checks and test coverage.
- SDK analytics and isolated error reporting, with PII filtering, bank redirect URL sanitization, and a privacy manifest.


## Related

- [iOS SDK v1 documentation](/platform/sdk/ios-sdk/v1) - latest version (v1.0.0)
- [iOS SDK overview](/platform/sdk/ios-sdk)
- [Android SDK](/platform/sdk/android-sdk) - Glomo SDK for native Android apps
- [Flutter SDK](/platform/sdk/flutter-sdk) - Glomo SDK for Flutter apps