Skip to content

Commit

Permalink
docs: add Expo integration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
pshoniuk committed Oct 19, 2023
1 parent 98cd776 commit f21545e
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app.plugin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const withGiphyRNSdk = (config) => {
if (!config.ios) config.ios = {}
if (!config.ios.infoPlist) config.ios.infoPlist = {}

return config
}

module.exports = withGiphyRNSdk
26 changes: 26 additions & 0 deletions docs/expo-integration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Expo Installation

> This package cannot be used in the "Expo Go" app
> because [it requires custom native code](https://docs.expo.dev/workflow/customizing/).
First install the package with yarn, npm, or [`npx expo install`](https://docs.expo.dev/more/expo-cli/#installation).

```sh
expo install @giphy/react-native-sdk
```

After installing this npm package, add the [config plugin](https://docs.expo.io/guides/config-plugins/) to
the [`plugins`](https://docs.expo.io/versions/latest/config/app/#plugins) array of your `app.json` or `app.config.js`:

```json
{
"expo": {
"plugins": [
"@giphy/react-native-sdk"
]
}
}
```

Next, rebuild your app as described in the ["Adding custom native code"](https://docs.expo.dev/workflow/customizing/)
guide.
3 changes: 3 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

### Installation

> 🚨 Expo: This package is not available in the [Expo Go](https://expo.io/client) app. Learn how you can use it
> with [custom dev clients](./expo-integration.md).
```bash
yarn add @giphy/react-native-sdk
```
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"ios",
"cpp",
"giphy-react-native-sdk.podspec",
"app.plugin.js",
"!lib/typescript/example",
"!android/build",
"!ios/build",
Expand Down

0 comments on commit f21545e

Please sign in to comment.