Skip to content

Commit 982219a

Browse files
feat: add troubleshooting guide for React Native (#4990)
1 parent bed3561 commit 982219a

File tree

4 files changed

+99
-3
lines changed

4 files changed

+99
-3
lines changed

apps/portal/src/app/react-native/v5/getting-started/page.mdx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,24 @@ If the Expo CLI says "Using Expo Go" when starting the app, press `s` to switch
159159

160160
</Callout>
161161

162-
Examples:
162+
Prebuild the app (only needed once):
163+
164+
```shell
165+
npx expo prebuild
166+
```
167+
168+
Run the development build on ios:
163169

164170
```shell
165171
npx expo:run ios
166172
```
167173

174+
Run the development build on android:
175+
176+
```shell
177+
npx expo:run android
178+
```
179+
168180
</Step>
169181

170182
<Step title=" Use the `thirdweb` package normally">

apps/portal/src/app/react-native/v5/sidebar.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Book, CodeIcon, ZapIcon } from "lucide-react";
1+
import { Book, BugIcon, CodeIcon, ZapIcon } from "lucide-react";
22
import type { SideBar } from "../../../components/Layouts/DocLayout";
33
import { ReactIcon, TypeScriptIcon } from "../../../icons";
44
import { fetchTypeScriptDoc } from "../../references/components/TDoc/fetchDocs/fetchTypeScriptDoc";
@@ -22,6 +22,11 @@ export const sidebar: SideBar = {
2222
href: `${slug}/getting-started`,
2323
icon: <ZapIcon />,
2424
},
25+
{
26+
name: "Troubleshooting",
27+
href: `${slug}/troubleshooting`,
28+
icon: <BugIcon />,
29+
},
2530
{ separator: true },
2631
{
2732
name: "Core",
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Troubleshooting
2+
3+
## Expo Go
4+
5+
Due to required native dependencies, you cannot use Expo Go for running your app. You must use a development build.
6+
7+
You can create ios/android development builds using the following command:
8+
9+
```shell
10+
npx expo prebuild
11+
```
12+
13+
You can then run the development build using the following command:
14+
15+
```shell
16+
npx expo:run ios
17+
```
18+
19+
```shell
20+
npx expo:run android
21+
```
22+
23+
## OpenSSL iOS build error
24+
25+
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.
26+
27+
Here's how to pin the OpenSSL version in `app.json`:
28+
29+
```json
30+
{
31+
"expo": {
32+
"plugins": [
33+
"expo-build-properties",
34+
{
35+
"ios": {
36+
"extraPods": [
37+
{
38+
"name": "OpenSSL-Universal",
39+
"configurations": ["Release", "Debug"],
40+
"modular_headers": true,
41+
"version": "<OPENSSL_VERSION>"
42+
}
43+
]
44+
}
45+
}
46+
]
47+
}
48+
}
49+
```
50+
51+
Replace `<OPENSSL_VERSION>` with the correct version of OpenSSL for your Xcode version:
52+
53+
- Xcode 16: `3.3.2000`
54+
- Xcode 15: `3.1.5004`
55+
56+
Make sure you have `expo-build-properties` added to your `package.json` dependencies.
57+
58+
## Android minSdkVersion error
59+
60+
If you see an Android error mentioning `minSdkVersion`, you may need to update your `app.json` to set the `minSdkVersion` to a higher version.
61+
62+
Here's how to update the `minSdkVersion` in `app.json`:
63+
64+
```json
65+
{
66+
"expo": {
67+
"plugins": [
68+
"expo-build-properties",
69+
{
70+
"android": {
71+
"minSdkVersion": 26
72+
}
73+
}
74+
]
75+
}
76+
}
77+
```
78+
79+
Make sure you have `expo-build-properties` added to your `package.json` dependencies.

packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/useSwapSupportedChains.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async function fetchBuySupportedDestinations(
4242
async () => {
4343
const fetchWithHeaders = getClientFetch(client);
4444
const res = await fetchWithHeaders(
45-
`${getPaySupportedDestinations()}?isTestMode=${isTestMode}`,
45+
`${getPaySupportedDestinations()}${isTestMode ? "?isTestMode=true" : ""}`,
4646
);
4747
const data = (await res.json()) as Response;
4848
return data.result.map((item) => ({

0 commit comments

Comments
 (0)