Lisk Mobile is a cross-platform application written in React Native and primarily build for iOS and Android. It provides the users with all the functionality they need to send and receive LSK tokens, as well as reviewing the activity history of their or any other account in the Lisk blockchain.
Pre-Installation
The prerequisites to install and run Lisk Mobile from source using the different tagged releases are listed bellow. If you don't have them installed on your machine, please run the attached commands from your terminal.
Install Android Studio, which sould have these options checked installed:
Android SDK
Android SDK Platform
Performance (Intel ® HAXM)
Android Virtual Device
Install the Android SDK. Consider these configurations:
compileSdkVersion: 30
buildToolsVersion: 30.0.2
Installation
On your terminal, go to the directory you want to install Lisk Mobile and run:
$ git clone https://github.com/LiskHQ/lisk-mobile.git
$ cd lisk-mobile
$ nvm install
$ npm ci
$ npm run link
Run
$ npm start
Run on iOS - MacOS with Intel chip
To run the app on ios, you have to install pods.
For this, just run:
$ npx pod-install
$ npm run ios
Run on iOS - MacOS with Apple chip
If your machine has the Apple Silicon chip (not Intel), you will have to run some additional steps, which we hope are going to be solved in a short term while the new chip is more widely adopted.
The process is:
Locate in Terminal app in Finder.
Right-click and click on Get Info
Check the Open using Rosetta checkbox.
Quit Terminal app and run it again
Go to your app folder and run sudo gem install ffi
You can run the project in Xcode and use iOS simulators or alternatively use Android simulators. There are several options to set up your Android development environment. Please read React Native docs for more info.
There is a standalone app for debugging React Native. it has React and Redux debugger enabled by default. Please read React Native Debugger for more info.
Environment variables
You can fill out env.json with this variables:
{
"network": "Lisk network's name, can be mainnet or testnet.",
"passphrase": "Passphrase of your LSK account, to be filled out automatically on login",
"secondPassphrase": "Second passphrase of your LSK account, to be filled out automatically on send process.",
"useCommercialFonts": "Tells styleGuide/fonts.js file to load commercial fonts instead of Open Sans."
}
In order to avoid committing that file you can follow this approach as following:
$ git update-index --assume-unchanged env.json
Possible Errors for Mac Users
Errors on lottie-ios/Lottie.modulemap
If you face this error when trying to run the app:
Create android/local.properties and add this line in the file for Mac Users:
sdk.dir=/Users/username/Library/Android/sdk
OR
Set the environmental PATH to your sdk installation location.
Using Commercial Fonts
Since some of the fonts used in the production version are commercial, this repository only contains open source fonts and uses Open Sans as a replacement for the commercial ones.
If you have licensed copies of Basier Circle and Gilroy, you can add them to fonts folder with the naming convention stated in styleGuide/fonts.js file and make sure all the fonts are linked.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
请发表评论