This repository will host all information about using Blockstack with react native.
Currently it contains an example that uses the React Native Blockstack component
directly. This module will be published to npm under the name react-native-blockstack
. The source code of the component is located in BlockstackSDK
The repository also contains a playground for developing the above mentioned component (using a native module for Blockstack with the Blockstack Android SDK in the example)
Before you can play around with this SDK, you must first ensure react native is properly set up. Follow Facebook's official getting started guide here: https://facebook.github.io/react-native/docs/getting-started.html
Once that is complete, move on to the platform specific instructions below.
- Clone this repo.
- Open a terminal on your desktop.
- In the terminal, navigate to the
example/
directory. - Run
npm install
- In the terminal, navigate to the
example/ios
directory. - Run
pod install
- Open
example/ios/example-sdk-module.xcworkspace
in XCode.- The files under the
BlockstackSDK
folder are the React Native Blockstack component. - The rest of the project is a standard Objective-C iOS project, as created by the react native CLI's project generator.
- The files under the
- In the terminal, navigate to the
example/
directory. - Run
react-native run-ios
- Alternatively, you can run the iOS project directly from XCode.
Note: The user interface and relevant logic is defined as part of example/App.js
. Modify this file to change the app.
-
Clone this repo
git clone https://github.com/blockstack/blockstack-react-native.git
-
Open
example/android/build.gradle
in Android Studio You should see the two modules:app
: the Android code of the example,react-native-blockstack
: the Android code of the React Native Blockstack component
-
Open the
example/App.js
file in Android Studio if you want to change the app. -
Open a terminal on your desktop.
-
Change to the
example
directory.cd to `example`
-
Run
react-native run-android