Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/animo/indy-sdk-expo-plugin
Config plugin to auto configure Indy SDK for iOS & Android
https://github.com/animo/indy-sdk-expo-plugin
Last synced: 3 days ago
JSON representation
Config plugin to auto configure Indy SDK for iOS & Android
- Host: GitHub
- URL: https://github.com/animo/indy-sdk-expo-plugin
- Owner: animo
- License: apache-2.0
- Created: 2022-07-06T11:46:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-14T09:40:08.000Z (over 1 year ago)
- Last Synced: 2024-04-26T09:21:47.117Z (7 months ago)
- Language: TypeScript
- Size: 65 MB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
Indy SDK Expo Plugin
Powered by
Getting started
|
Contributing
|
License---
An [Expo Config Plugin](https://docs.expo.dev/guides/config-plugins/) to automatically set up and configure the Indy SDK for iOS & Android in React Native.
- 🧽 Clean and minimal repository as you don't need to commit your `ios` and `android` directories.
- ⚡️ Super quick setup of the Indy SDK for iOS & Android in React Native.
- 💰 Save hours of time by leveraging Expo's development tools and Expo Application Service.With the Indy SDK Expo Plugin you can leverage the `expo prebuild` command to generate the `ios` and `android` directories. This removes the need to following the tedious instructions for setting up the Indy SDK for react native, and means you don't need to commit the `ios` and `android` directories.
## Version Support
The Indy SDK Expo Plugin is developed against specific versions of Indy SDK React Native and Expo. While there is a chance of it working with other versions, currently the following versions are supported:
| Indy SDK Expo Plugin | Indy SDK React Native | Expo SDK |
| -------------------- | --------------------- | -------- |
| 0.1.0 | 0.2.2 | 45 |
| 0.2.0 | ^0.3.0 | 47 |
| 0.3.0 | ^0.3.0 | 48 |
| 0.3.0 | ^0.4.0 | 49 |## Getting Started
Install the plugin using the following command:
```sh
# yarn
yarn add --dev @animo-id/indy-sdk-expo-plugin# npm
npm install --save-dev @animo-id/indy-sdk-expo-plugin
```Then add the plugin to your Expo app config (`app.json`, `app.config.json` or `app.config.js`) `plugins` array:
```json
{
"expo": {
"plugins": ["@animo-id/indy-sdk-expo-plugin"]
}
}
```Because the `Indy.framework` is built without bitcode enabled, we must disable bitcode for the application. We can do this by setting the `expo.ios.bitcode` property to `false` in the Expo config
```json
{
"expo": {
"ios": {
"bitcode": false
}
}
}
```> NOTE: the `expo` top level key is only needed in `app.json`. In `app.config.json`, `app.config.js` and `app.config.ts` the top level expo key is not present anymore.
And lastly, prebuild the application so the indy-sdk can be added as native dependency (If you aren't making any manual modification to the iOS and Android directories you can add them to the gitignore of your project and generate them on demand):
```sh
# yarn
yarn expo prebuild# npm
npx expo prebuild
```That's it, you now have Indy SDK configured for your iOS and Android project. If you're using this plugin with [Aries Framework JavaScript](https://github.com/hyperledger/aries-framework-javascript) you will still need to follow the other setup steps, but you can skip the [Installation](https://aries.js.org/guides/getting-started/installation/react-native) for React Native.
## Test if everything works
Add the `indy-sdk-react-native` to your project:
```sh
# yarn
yarn add indy-sdk-react-native# npm
npm install -s indy-sdk-react-native
```Replace your `app.js` with the following:
```javascript
import { Button, StyleSheet, View } from 'react-native'
import Indy from 'indy-sdk-react-native'export default function app() {
const testIndy = () => {
Indy.createWallet({ id: 'sample-id' }, { key: 'sample-key' })
.then(() => console.log('Success!'))
.catch((e) => console.error(`An error occurred! ${e}`))
}return (
)
}const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
})
```## Contributing
Is there something you'd like to fix or add? Great, we love community
contributions! To get involved, please follow our [contribution guidelines](./CONTRIBUTING.md).## License
Indy SDK Plugin Expo is licensed under the [Apache License Version 2.0 (Apache-2.0)](./LICENSE).