diff --git a/apps/portal/src/app/react-native/v5/getting-started/page.mdx b/apps/portal/src/app/react-native/v5/getting-started/page.mdx index b9ae1f4751b..c4549725fe5 100644 --- a/apps/portal/src/app/react-native/v5/getting-started/page.mdx +++ b/apps/portal/src/app/react-native/v5/getting-started/page.mdx @@ -159,12 +159,24 @@ If the Expo CLI says "Using Expo Go" when starting the app, press `s` to switch -Examples: +Prebuild the app (only needed once): + +```shell +npx expo prebuild +``` + +Run the development build on ios: ```shell npx expo:run ios ``` +Run the development build on android: + +```shell +npx expo:run android +``` + diff --git a/apps/portal/src/app/react-native/v5/sidebar.tsx b/apps/portal/src/app/react-native/v5/sidebar.tsx index da7498f7634..d601b9aa1b6 100644 --- a/apps/portal/src/app/react-native/v5/sidebar.tsx +++ b/apps/portal/src/app/react-native/v5/sidebar.tsx @@ -1,4 +1,4 @@ -import { Book, CodeIcon, ZapIcon } from "lucide-react"; +import { Book, BugIcon, CodeIcon, ZapIcon } from "lucide-react"; import type { SideBar } from "../../../components/Layouts/DocLayout"; import { ReactIcon, TypeScriptIcon } from "../../../icons"; import { fetchTypeScriptDoc } from "../../references/components/TDoc/fetchDocs/fetchTypeScriptDoc"; @@ -22,6 +22,11 @@ export const sidebar: SideBar = { href: `${slug}/getting-started`, icon: , }, + { + name: "Troubleshooting", + href: `${slug}/troubleshooting`, + icon: , + }, { separator: true }, { name: "Core", diff --git a/apps/portal/src/app/react-native/v5/troubleshooting/page.mdx b/apps/portal/src/app/react-native/v5/troubleshooting/page.mdx new file mode 100644 index 00000000000..218e9c60d66 --- /dev/null +++ b/apps/portal/src/app/react-native/v5/troubleshooting/page.mdx @@ -0,0 +1,79 @@ +# Troubleshooting + +## Expo Go + +Due to required native dependencies, you cannot use Expo Go for running your app. You must use a development build. + +You can create ios/android development builds using the following command: + +```shell +npx expo prebuild +``` + +You can then run the development build using the following command: + +```shell +npx expo:run ios +``` + +```shell +npx expo:run android +``` + +## OpenSSL iOS build error + +If you see a build error that mentions OpenSSL, you may need to update `app.json` to pin a version of OpenSSL that is compatible with your Xcode version. + +Here's how to pin the OpenSSL version in `app.json`: + +```json +{ + "expo": { + "plugins": [ + "expo-build-properties", + { + "ios": { + "extraPods": [ + { + "name": "OpenSSL-Universal", + "configurations": ["Release", "Debug"], + "modular_headers": true, + "version": "" + } + ] + } + } + ] + } +} +``` + +Replace `` with the correct version of OpenSSL for your Xcode version: + +- Xcode 16: `3.3.2000` +- Xcode 15: `3.1.5004` + +Make sure you have `expo-build-properties` added to your `package.json` dependencies. + +## Android minSdkVersion error + +If you see an Android error mentioning `minSdkVersion`, you may need to update your `app.json` to set the `minSdkVersion` to a higher version. + +Here's how to update the `minSdkVersion` in `app.json`: + +```json +{ + "expo": { + "plugins": [ + "expo-build-properties", + { + "android": { + "minSdkVersion": 26 + } + } + ] + } +} +``` + +Make sure you have `expo-build-properties` added to your `package.json` dependencies. diff --git a/packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.ts b/packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.ts index fc7ac8ed902..5ddd3f045e6 100644 --- a/packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.ts +++ b/packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.ts @@ -42,7 +42,7 @@ async function fetchBuySupportedDestinations( async () => { const fetchWithHeaders = getClientFetch(client); const res = await fetchWithHeaders( - `${getPaySupportedDestinations()}?isTestMode=${isTestMode}`, + `${getPaySupportedDestinations()}${isTestMode ? "?isTestMode=true" : ""}`, ); const data = (await res.json()) as Response; return data.result.map((item) => ({