npm.io
1.1.0 • Published 5 years ago

with-rn-get-social

Licence
MIT
Version
1.1.0
Deps
2
Size
16 kB
Vulns
0
Weekly
0

Expo - with-rn-get-social

An Expo config plugin to setup getsocial-react-native-sdk, without touching native code

You can learn more about it here:

Getting started

Some points you need to be aware of before use this plugin

  • This plugin only works on Android
  • The plugin relays on regex to make some file modifications, so if it doesn't work with your configuration feel free to open an issue

Installation

Prerequisites:
  • App project using Expo SDK 41+.
  • Installed expo-cli@4.4.4 or later.
  • Installed getsocial-react-native-sdk JavaScript libraries: yarn add getsocial-react-native-sdk
With expo install
expo install with-rn-get-social
Without expo install
# using yarn
yarn add with-rn-get-social

# using npm
npm install with-rn-get-social

Open your app.json or app.config.js and update your plugins section (expo install would do it for you):

{
  "plugins": ["with-rn-get-social"]
}

Configuration

The plugin needs to know the appId from GetSocial, you can read about how to configure GetSocial and get your appId on Enable supported stores

Optionally you can pass the hostnames to configure the android manifest, if ommited default values will be used (getsocialdemo5.gsc.im and getsocialdemo5-gsalt.gsc.im) You can read more about in Setup app links

{
  "plugins": [
    [
      "with-rn-get-social", { appId: "YOUR_APP_ID_HERE", hostnames: ["HOSTNAME_1", "HOSTNAME_2"] }
    ]
  ]
}

Building and running

You can either:

  • Use expo prebuild or expo run:android/expo run:ios to update your native projects,
  • Use EAS Build to build your development client.

Credits

  • The Expo team

License

MIT

Keywords