The Opacity Networks sample application written for React Native on iOS, using a MAC development environment.
This is a React Native project, bootstrapped using @react-native-community/cli.
Android support is still experimental at this stage.
For additional reference please review our documentation: https://docs.opacity.network/
For core sdk repositories:
- React Native: https://github.com/OpacityLabs/react-native-opacity
- iOS: https://github.com/OpacityLabs/opacity-ios
- Android: https://github.com/OpacityLabs/opacity-android
- Flutter: https://github.com/OpacityLabs/flutter-opacity-core
-
Install Homebrew if necessary.
-
Follow directions in the React Native documentation. The latest version of XCode installs the command-line tools and the latest iOS emulator for you automatically.
-
Install yarn.
brew install yarn
-
Install the CocoaPods depndency manager.
brew install cocoapods
-
Clone the github repository.
git clone https://github.com/OpacityLabs/opacity-rn-sample.git cd opacity-rn-sample -
Install packages
yarn install
-
Update dependencies. Note that you need to redo this step when you pull a new version from GitHub.
yarn pods
-
Open XCode.
-
Compile (if needed) and start the application.
yarn ios
Note that compilation takes a long time, especially the first one. Also, if you get a white iPhone screen, close the application and start it again.
-
You need an API key, get it from the Opacity developer portal.
-
The sample application should open automatically. If it does not, scroll right in the emulator and in the second screen click opacitySample.
-
Paste the API key in the field and click Next.
-
Select the platform to search. For the purpsoe of this guide, select GitHub.
-
Click the resource Profile and log on to your GitHub account.
-
See that you can view your GitHub profile through Opacity. Unfortunately, it is harder to show in a demo that the protocol is working correctly, that the data is truly safe and verified.