Skip to content

Commit

Permalink
docs: add instructions to disable expo-dev-client network inspector t…
Browse files Browse the repository at this point in the history
…o README.md

Addresses #223
  • Loading branch information
frw authored Feb 14, 2024
1 parent 0a144d5 commit e851d71
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,39 @@ Before building for iOS, make sure to run the following commands:
cd ios && pod install && cd ..
```

### Expo
### Expo Managed Workflow
```sh
npx expo install react-native-ssl-public-key-pinning
```
and then follow the steps to create a [development build](https://docs.expo.dev/develop/development-builds/create-a-build/) or [production build](https://docs.expo.dev/deploy/build-project/)

#### Disable `expo-dev-client` Network Inspector on iOS (Optional)
If you are building an iOS Expo development build and want to test out your pinning configuration, you will need to disable `expo-dev-client`'s network inspector as it [interferes with the pinning setup](https://github.com/frw/react-native-ssl-public-key-pinning/issues/223). Note that the network inspector is automatically disabled on production builds and so this library would function properly on production builds without needing to go through the following steps.

1. Install `expo-build-properties`
```
npx expo install expo-build-properties
```
2. Add the following plugin configuration to your `app.json`
```
{
"expo": {
"plugins": [
[
"expo-build-properties",
{
"ios": {
"networkInspector": false
}
}
]
]
}
}
```
3. Run prebuild to update native files
```
npx expo prebuild
```

Expand Down

0 comments on commit e851d71

Please sign in to comment.