Skip to content

feat(ios): add CNAME and payment callback APIs - #267

Open
thomson-t wants to merge 1 commit into
mainfrom
thomson-t/update-ios-sdk-5.2.0
Open

feat(ios): add CNAME and payment callback APIs#267
thomson-t wants to merge 1 commit into
mainfrom
thomson-t/update-ios-sdk-5.2.0

Conversation

@thomson-t

@thomson-t thomson-t commented May 8, 2026

Copy link
Copy Markdown
Contributor

Background

  • The React Native wrapper needs to expose the iOS SDK 5.2.0 capabilities for first-party routing and redirect-based payment callbacks.
  • The callback URL scheme is shared by supported web-view payment flows, so the public API, sample apps, and docs should describe it generically.

What Has Changed

  • Bumped the iOS native dependency to Rokt-Widget >= 5.2.0 and the wrapper version to 5.1.0.
  • Added Rokt.setCustomBaseURL(url), Rokt.setPaymentCallbackURLScheme(scheme), and Rokt.handleURLCallback(url) to the React Native bridge.
  • Added Android no-op shims for the iOS-only APIs.
  • Updated RoktSampleApp and ExpoTestApp to demo CNAME configuration and payment callback URL forwarding.
  • Updated README docs, changelog, pod lockfile, and package lockfiles for the wrapper release.

Screenshots/Video

  • Please add or refresh sample app screenshots/video for the Advanced (iOS) controls before merge.

Checklist

  • I have performed a self-review of my own code.
  • I have made corresponding changes to the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have tested this locally.

Additional Notes

  • Local verification: Rokt.Widget npm run build; Rokt.Widget npm run lint; trunk check --ci.
  • Android native SDK pin remains unchanged.

@thomson-t
thomson-t requested a review from a team as a code owner May 8, 2026 16:36

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9a7025b62a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread ExpoTestApp/package.json
},
"dependencies": {
"@rokt/react-native-sdk": "file:../Rokt.Widget/rokt-react-native-sdk-5.0.0.tgz",
"@rokt/react-native-sdk": "file:../Rokt.Widget/rokt-react-native-sdk-5.1.0.tgz",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Update the Expo lockfile with the SDK bump

Changing the Expo app dependency to the 5.1.0 tarball without updating ExpoTestApp/package-lock.json leaves the lockfile root dependency and node_modules/@rokt/react-native-sdk entry pinned to rokt-react-native-sdk-5.0.0.tgz; in environments that install the sample with npm ci, this package/lock mismatch fails before the app can build, and lockfile-based installs can keep resolving the old SDK that lacks the new APIs used in App.tsx.

Useful? React with 👍 / 👎.

Comment thread Rokt.Widget/src/Rokt.tsx
* scheme, host, and port — any path, query, or fragment is ignored.
* Non-HTTPS URLs or URLs with a missing/empty host are rejected.
*
* iOS only — no-op on Android.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Will update after Android version support is added

@BrandonStalnaker BrandonStalnaker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

one minor thought but looks good in general

Comment thread ExpoTestApp/App.tsx
if (Platform.OS !== "ios") {
return;
}
const subscription = Linking.addEventListener("url", ({ url }) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: Not sure it applies for our case but we may want to handle the cold start deep link path as well

  Linking.getInitialURL().then((url) => {
    if (cancelled || !url) return;
    handleUrl(url);
  });

Bump the iOS native dependency to Rokt-Widget 5.2.0 and expose
new React Native APIs for first-party routing and redirect-based
payment callbacks.

Adds setCustomBaseURL, setPaymentCallbackURLScheme, and
handleURLCallback to the bridge with Android no-op shims for the
iOS-only methods. Updates the sample apps, docs, changelog, pod
lockfile, and package lockfiles for the 5.1.0 wrapper release.
@thomson-t
thomson-t force-pushed the thomson-t/update-ios-sdk-5.2.0 branch from 9374189 to 2cffaea Compare May 11, 2026 18:09
@thomson-t thomson-t changed the title feat: update to native iOS SDK 5.2.0 and add CNAME / PayPal APIs feat(ios): add CNAME and payment callback APIs May 11, 2026
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