Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
eca7091
chore(example-bare): scaffold stock RN 0.85 app for Nitro spike
YouCanKeepSilence May 29, 2026
3528b07
chore: add Nitro tooling, drop Expo autolinking + build wiring
YouCanKeepSilence May 29, 2026
88f7fb4
spike: Nitro HybridObject (ping) wired; RN-CLI autolinking via react-…
YouCanKeepSilence May 29, 2026
760aed4
fix(nitro): drop invalid package react-native.config.js + podspec lic…
YouCanKeepSilence May 29, 2026
658ea8a
fix(example-bare): build RN core from source (RCT_USE_PREBUILT_RNCORE=0)
YouCanKeepSilence May 29, 2026
f3c1e19
fix(nitro): move podspec to package root so add_nitrogen_files globs …
YouCanKeepSilence May 29, 2026
d2aff80
chore(nitro): drop unneeded RCT_USE_PREBUILT_RNCORE workaround; publi…
YouCanKeepSilence May 29, 2026
b637e32
spike: proofs #2 SDK interop, #3 SwiftUI Nitro View, #4 event callback
YouCanKeepSilence May 29, 2026
0736cd5
fix(example-bare): adaptive text colors so the on-screen log is reada…
YouCanKeepSilence May 29, 2026
d7b8f2f
feat(nitro): Phase 1 core module — configure/initialize/reset/signOut…
YouCanKeepSilence May 29, 2026
6cf8c28
test(nitro): rewire jest to the Nitro hybrid object mock
YouCanKeepSilence May 29, 2026
7579ca7
feat(nitro): Phase 2 — checkout view as a Nitro View + getCheckoutReq…
YouCanKeepSilence May 29, 2026
b165d01
feat(nitro): map new provider-lifecycle CheckoutEvents from the SDK
YouCanKeepSilence May 29, 2026
c994fea
refactor(types): type checkoutFinalized.response against the SDK
YouCanKeepSilence May 29, 2026
453537c
feat(nitro): Expo config plugin — support Expo prebuild consumers too
YouCanKeepSilence May 29, 2026
9b811a8
fix(example): install react-native-nitro-modules in the Expo example
YouCanKeepSilence May 29, 2026
093453e
docs: update README + integration guide for the Nitro migration
YouCanKeepSilence Jun 1, 2026
f8abe37
fix(nitro): lower iOS floor to 16.0; stop the config plugin forcing d…
YouCanKeepSilence Jun 1, 2026
f7e55d0
build(nitro): replace expo-module-scripts with react-native-builder-bob
YouCanKeepSilence Jun 1, 2026
48940ab
fix(nitro): scope prepared-intent single-flight per client; fix butto…
YouCanKeepSilence Jun 1, 2026
4dd37a5
chore(example): enable App Attest in example-bare; fix NitroModules p…
YouCanKeepSilence Jun 1, 2026
f480de9
Regenerated xcode files
YouCanKeepSilence Jun 2, 2026
4fb024c
ci(ios): pass RELEASE_REPO_TOKEN to fetch-xcframework
YouCanKeepSilence Jun 2, 2026
bdfcad9
Added LICENSE
YouCanKeepSilence Jun 2, 2026
08925c7
refactor(example): promote bare RN app to primary example; rename Exp…
YouCanKeepSilence Jun 2, 2026
5f09710
chore(deps): lower react-native peer floor 0.85 -> 0.79
YouCanKeepSilence Jun 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .eslintrc.js

This file was deleted.

10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
node-version: '20'
cache: 'npm'
- run: npm ci --legacy-peer-deps
- run: npm ci
- run: npm run lint
- run: npm run typecheck
- run: npx jest
Expand All @@ -34,6 +34,12 @@ jobs:
with:
node-version: '20'
cache: 'npm'
- run: npm ci --legacy-peer-deps
- run: npm ci
- run: npm run fetch-xcframework
env:
# Cross-repo read of the private onramper/onramper-ios release.
# The auto GITHUB_TOKEN is scoped to this repo only, so a
# fine-grained PAT (Contents: Read-only on onramper-ios) is required.
# Remove this once onramper-ios is public.
GH_TOKEN: ${{ secrets.RELEASE_REPO_TOKEN }}
- run: npm run verify-version
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
node -e "const fs=require('fs');const p=JSON.parse(fs.readFileSync('package.json'));p.version=process.env.VERSION;p.onramperSDK={checksum:'PENDING_FETCH'};fs.writeFileSync('package.json',JSON.stringify(p,null,2)+'\n');"

- name: Fetch xcframework + checksum
run: npm ci --legacy-peer-deps && npm run fetch-xcframework
run: npm ci && npm run fetch-xcframework

- name: Verify checksum recorded
run: npm run verify-version
Expand Down
29 changes: 15 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Node
node_modules/
build/
lib/
*.log
npm-debug.log
yarn-debug.log
Expand All @@ -14,17 +14,17 @@ ios/Pods/
android/build/
android/.gradle/

# Example app
example/node_modules/
example/ios/Pods/
example/ios/build/
example/android/build/
example/android/.gradle/
example/android/app/build/
example/.expo/
example/.bundle/
example/vendor/
example/env.local.ts
# Expo example app
example-expo/node_modules/
example-expo/ios/Pods/
example-expo/ios/build/
example-expo/android/build/
example-expo/android/.gradle/
example-expo/android/app/build/
example-expo/.expo/
example-expo/.bundle/
example-expo/vendor/
example-expo/env.local.ts

# Xcode
*.pbxuser
Expand Down Expand Up @@ -67,5 +67,6 @@ jsconfig.json
# Local secrets
.env
.env.local
example/.env
example/.env.local
example-expo/.env
example-expo/.env.local
example/env.local.ts
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License

Copyright (c) 2026 - Onramper Technologies B.V. (https://onramper.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
36 changes: 36 additions & 0 deletions OnramperReactNative.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
require 'json'

package = JSON.parse(File.read(File.join(__dir__, 'package.json')))

Pod::Spec.new do |s|
s.name = 'OnramperReactNative'
s.version = package['version']
s.summary = package['description']
s.description = package['description']
s.license = { :type => 'UNLICENSED' }
s.author = package['author']
s.homepage = package['homepage']
s.platforms = { :ios => '16.0' }
s.swift_version = '5.9'
s.source = { :git => "#{package['repository']}.git", :tag => "v#{s.version}" }

s.pod_target_xcconfig = {
'DEFINES_MODULE' => 'YES',
}

# This podspec lives at the package root (not ios/) because nitrogen emits its
# generated source globs (nitrogen/generated/**) relative to the podspec's
# directory via add_nitrogen_files below. Our own sources are ios/-prefixed.
s.source_files = 'ios/*.swift'
s.vendored_frameworks = 'ios/Frameworks/OnramperSDK.xcframework'

load File.join(__dir__, 'nitrogen', 'generated', 'ios', 'OnramperReactNative+autolinking.rb')
add_nitrogen_files(s)

# Wires up the React Native new-architecture dependencies and header search
# paths (React-Core, React-RCTFabric, ReactCommon, Yoga, folly, …). Required
# because our Nitro View's generated code includes React Fabric headers, which
# transitively include yoga/style/Style.h — without this the pod fails to
# compile with "'yoga/style/Style.h' file not found".
install_modules_dependencies(s)
end
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,20 @@ React Native wrapper for the Onramper iOS SDK.
## Install

```bash
npm install @onramper/react-native expo-modules-core
npm install @onramper/react-native react-native-nitro-modules
cd ios && pod install
```

Requires React Native 0.81+, `expo-modules-core` 56+, and iOS deployment target 16.4. Works in bare RN and Expo dev clients (not Expo Go the package vendors a native binary).
Requires React Native 0.79+, `react-native-nitro-modules` 0.35+, the **New Architecture**, and an iOS **16.0+** deployment target. Works in **bare React Native (no Expo required)** and **Expo** apps — not Expo Go, since the package vendors a native binary.

If your app doesn't yet use Expo Modules:
**Expo apps** — add the bundled config plugin to `app.json`, then prebuild:

```bash
npx install-expo-modules@latest
```json
{ "expo": { "plugins": ["@onramper/react-native"] } }
```

The plugin applies the required iOS build flag (it does not change your deployment target). Set your app's deployment target to **16.4+** — Expo SDK 56's own minimum (bare RN only needs 16.0). For bare-RN Podfile setup (Xcode 16+/26) and full details, see the [integration guide](docs/INTEGRATION.md).

## Quick start

```ts
Expand Down Expand Up @@ -100,13 +102,13 @@ Full code list in `src/errors.ts`.

The vendored `OnramperSDK.xcframework` already ships its own `PrivacyInfo.xcprivacy`. Don't add a duplicate.

## Known limitations (v1)
## Known limitations

- `CheckoutEvent.checkoutCancelled` is not surfaced in this release — the bundled `OnramperSDK@1.0.0` xcframework doesn't include the case. It will be available when the SDK is rebuilt with the case.
- Native checkout outcomes flow via the module-level event stream (`client.addEventListener(...)`), not per-view event handlers. The view's `onCheckoutCompleted`/`onCheckoutFailed`/`onCheckoutCancelled` props are declared for forward-compat but only `onCheckoutFailed` fires today (for handle-binding errors).
- Native checkout outcomes are observed via the module-level event stream (`client.addEventListener(...)`); the native checkout button exposes no per-instance callbacks.

## Troubleshooting

- **`pod install` fails finding the xcframework** — confirm `node_modules/@onramper/react-native/ios/Frameworks/OnramperSDK.xcframework/` exists.
- **Bare RN build fails with `module map file ... not found` (Xcode 16+/26)** — disable explicit Swift modules in your `Podfile` `post_install` (`SWIFT_ENABLE_EXPLICIT_MODULES = NO`). Expo apps get this automatically via the config plugin. See the [integration guide](docs/INTEGRATION.md).
- **App Attest errors in simulator** — expected. App Attest only works on real devices. The SDK surfaces this as `attestationFailed`.
- **Buttons appear but sheets don't open** — the host RN screen must be inside a normal `UIViewController` (the default). Modal-presented screens may need extra care; report an issue with a repro.
Loading
Loading