``` <!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" [Portal] Fix: Update SDK title for TypeScript reference pages If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Updates the SDK title displayed on TypeScript reference pages from "Connect SDK" to "TypeScript SDK" for improved clarity and accuracy. ## How to test Navigate to any `/references/typescript/v*/` page (e.g., `/references/typescript/v5/`). Verify the header displays "TypeScript SDK". --> ``` --- **Open Background Agent:** [Web](https://www.cursor.com/agents?id=bc-2dec36af-4b62-431c-b277-891c1b46bb48) · [Cursor](https://cursor.com/background-agent?bcId=bc-2dec36af-4b62-431c-b277-891c1b46bb48) [Slack Thread](https://thirdwebdev.slack.com/archives/C04DYC3G5NZ/p1753110978408999?thread_ts=1753110978.408999&cid=C04DYC3G5NZ) Learn more about [Background Agents](https://docs.cursor.com/background-agents) <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on renaming references from `Connect SDK` to `TypeScript SDK` and `thirdweb SDK` across multiple files in the project, enhancing clarity and consistency in the documentation and codebase. ### Detailed summary - Updated `label` from `Connect SDKs` to `thirdweb SDKs`. - Changed `name` from `Connect SDK` to `TypeScript SDK`. - Modified `sdkTitle` from `Connect SDK` to `TypeScript SDK`. - Adjusted example descriptions and titles to reflect `TypeScript SDK`. - Updated installation instructions to refer to `TypeScript SDK`. - Revised descriptions related to wallet support to mention `thirdweb SDKs`. - Changed references in guides and documentation from `Connect SDK` to `TypeScript SDK`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Updated SDK naming from "Connect SDK" to "TypeScript SDK" and "thirdweb SDK" across documentation, guides, UI labels, and sidebar links for improved clarity and consistency. * **Chores** * Removed the "Engine" API link from the main navigation header. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
3.8 KiB
React Native Adapter
This package is required to run the thirdweb SDK in React Native.
Instructions
1. Install the packages
Using your favorite pacakge manager, install all the require dependencies
npx expo install thirdweb @thirdweb-dev/react-native-adapter
Since react native requires installing native dependencies directly, you also have to install these required peer dependencies:
npx expo install react-native-get-random-values @react-native-community/netinfo expo-application @react-native-async-storage/async-storage expo-web-browser expo-linking react-native-aes-gcm-crypto [email protected] amazon-cognito-identity-js @coinbase/wallet-mobile-sdk react-native-mmkv react-native-svg @react-native-clipboard/clipboard
Here's an explanation of each peer dependency and why its needed:
// needed for wallet connect
react-native-get-random-values
@react-native-community/netinfo
expo-application
// needed wallet connect + in-app wallet
@react-native-async-storage/async-storage
// needed for inapp wallet
expo-web-browser // for oauth flows
amazon-cognito-identity-js // for authentication
react-native-aes-gcm-crypto // for encryption
[email protected] //for fast hashing
// needed for the prebuilt UIs
react-native-svg
@react-native-clipboard/clipboard
2. Edit your metro.config.js
If you don't already have a metro.config.file.js in your project, you can create one by running:
npx expo customize metro.config.js
Then, you need to add 2 properties to the metro resolver: unstable_enablePackageExports and unstable_conditionNames. This is to tell metro to resolve named exports properly.
// file: metro.config.js
// Learn more https://docs.expo.io/guides/customizing-metro
const { getDefaultConfig } = require("expo/metro-config");
/** @type {import('expo/metro-config').MetroConfig} */
const config = getDefaultConfig(__dirname);
// ADD THESE 2 PROPERTIES
config.resolver.unstable_enablePackageExports = true;
config.resolver.unstable_conditionNames = [
"react-native",
"browser",
"require",
];
module.exports = config;
3. Import @thirdweb-dev/react-native-adapter at the top of your App.tsx
This will polyfill all the required functionality needed.
// this needs to be imported before anything else
import "@thirdweb-dev/react-native-adapter";
// the rest of your app
If you're using expo-router, you need to polyfill before the router entry:
- create a
app/index.ts
This will be the new entrypoint to your app, ensuring the polyfills happen before any routing.
// file: app/index.ts
// this needs to be imported before expo-router
import "@thirdweb-dev/react-native-adapter";
import "expo-router/entry";
- Change your main entrypoint in
package.json
Now you can replace expo-router/entry with ./app/index as your main entrypoint.
// file: package.json
"main": "./app/index",
Additional notes
react-native-aes-gcm-cryptorequiresminSDK 26for android, you can edit this in yourbuild.gradlefile- You will get some warnings about unresolved exports, this is normal and will get better as the libraries get updated.
Use the thirdweb package in React Native
Once all the setup above is all done, you can use the most of functionality in the thirdweb package out of the box, without having to do any react native specific code.
This means that you can follow all the React documentation and expect it all to be exactly the same.
Examples:
import { ThirdwebProvider } form "thirdweb/react";