feat(ios): add CNAME and payment callback APIs - #267
Conversation
There was a problem hiding this comment.
💡 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".
| }, | ||
| "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", |
There was a problem hiding this comment.
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 👍 / 👎.
| * 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. |
There was a problem hiding this comment.
Will update after Android version support is added
BrandonStalnaker
left a comment
There was a problem hiding this comment.
one minor thought but looks good in general
| if (Platform.OS !== "ios") { | ||
| return; | ||
| } | ||
| const subscription = Linking.addEventListener("url", ({ url }) => { |
There was a problem hiding this comment.
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.
9374189 to
2cffaea
Compare
Background
What Has Changed
Rokt-Widget >= 5.2.0and the wrapper version to5.1.0.Rokt.setCustomBaseURL(url),Rokt.setPaymentCallbackURLScheme(scheme), andRokt.handleURLCallback(url)to the React Native bridge.RoktSampleAppandExpoTestAppto demo CNAME configuration and payment callback URL forwarding.Screenshots/Video
Checklist
Additional Notes
Rokt.Widgetnpm run build;Rokt.Widgetnpm run lint;trunk check --ci.